ITADN

Slice 2: Segment → Beat physical DB migration

#1150Closedmattpocock 创建于 2026-07-06
M
mattpocockcommented
## Parent #1148 — Execute the Segment → Beat / clip Beat → Pause rename (from spec #1147) ## What to build Rename the **physical** database table `course-video-manager_segment` → `course-video-manager_beat` (and its column names) via a data-preserving migration, without touching any TypeScript symbol names. Drizzle maps a relation onto a physical table name independently of the exported symbol, so the `segments` relation and all `segment` code keep working — the app compiles and behaves identically, now backed by the `_beat` table. This is a deliberate prefactor: it lands and verifies the risky data migration in isolation, ahead of the large code sweep (Slice 5). Source of truth: `docs/segment-beat-pause-rename-spec.md` §4 and §8. ## Acceptance criteria - [ ] Transactional `ALTER TABLE ... RENAME` migration renames the physical table (and any owned columns) `segment` → `beat`; all rows, kinds, descriptions, ordering, and Video assignments preserved - [ ] Drizzle `pgTable("...")` table-name string updated to `course-video-manager_beat`; TS relation/symbol names left as `segment` for now - [ ] `drizzle-kit push` run; constraint/index names synced - [ ] App builds and the full suite passes unchanged — no behavioral or symbol-name diff beyond the table string - [ ] Verified: reading and writing planning units works against the renamed table with no data loss ## Blocked by - #1149 (cascade order — free "beat" at the clip layer first)
关闭于 2026-07-06 1 条评论