cleanup: compact the blank-start database migration baseline #307

Closed
opened 2026-05-11 19:19:07 +00:00 by barrettruth · 0 comments
Owner

Parent: #305

Problem

A fresh migrated database still replays the historical product shape: automations, event share links, invite links, reminder tables, WebAuthn/recovery/session tables, and other removed surfaces. That undermines the blank-start goal and makes future schema work harder to reason about.

Solution

Decide and implement the v0.1 migration policy:

  • if pre-alpha data compatibility is not required, replace the migration chain with a compact current baseline
  • if compatibility is required, add forward migrations that remove retired tables/columns while preserving live task/calendar data
  • make the active schema and migration history agree about the current product scope
  • document the decision in the PR body so future schema changes follow the same rule

Acceptance criteria

  • A fresh database no longer creates tables/columns for removed product surfaces unless an explicit compatibility reason is documented.
  • src/db/schema.ts, drizzle/*.sql, and drizzle/meta/* agree.
  • Tests create the same shape as production migrations.
  • No migration or test fixture contains secret values.
  • just lint and the relevant database/core tests pass.
Parent: #305 ## Problem A fresh migrated database still replays the historical product shape: automations, event share links, invite links, reminder tables, WebAuthn/recovery/session tables, and other removed surfaces. That undermines the blank-start goal and makes future schema work harder to reason about. ## Solution Decide and implement the v0.1 migration policy: - if pre-alpha data compatibility is not required, replace the migration chain with a compact current baseline - if compatibility is required, add forward migrations that remove retired tables/columns while preserving live task/calendar data - make the active schema and migration history agree about the current product scope - document the decision in the PR body so future schema changes follow the same rule ## Acceptance criteria - A fresh database no longer creates tables/columns for removed product surfaces unless an explicit compatibility reason is documented. - `src/db/schema.ts`, `drizzle/*.sql`, and `drizzle/meta/*` agree. - Tests create the same shape as production migrations. - No migration or test fixture contains secret values. - `just lint` and the relevant database/core tests pass.
barrettruth added this to the v0.1.0 milestone 2026-05-11 19:19:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta#307
No description provided.