fix(db): squash migrations to single baseline (cold-migrate was broken)

0000_easy_slipstream already created lists/list_shares/list_items and the
calendars unique constraint, but 0001_lists_schema re-created those tables and
0001_calendars_user_url_unique was an orphan (not in _journal) — so a cold
`drizzle-kit migrate` against an empty DB failed with ERROR 1050 'Table lists
already exists'. Dev only survived because its DB was built incrementally; CI
is the first cold migrate and exposed it.

Regenerated a single 0000_baseline.sql from schema.ts. Verified on a fresh
mariadb:11: migrate succeeds, schema is structurally identical to the running
dev DB, `drizzle-kit generate` reports no drift, and all 238 API tests pass.
Local dev DBs must be rebuilt (drop + db:migrate); no prod exists.
This commit is contained in:
Lucas Berger
2026-06-11 14:28:08 -04:00
parent 3343f36e97
commit c0f892cae5
11 changed files with 126 additions and 2939 deletions
+2 -30
View File
@@ -5,36 +5,8 @@
{
"idx": 0,
"version": "5",
"when": 1781020239657,
"tag": "0000_easy_slipstream",
"breakpoints": true
},
{
"idx": 1,
"version": "5",
"when": 1781020500000,
"tag": "0001_lists_schema",
"breakpoints": true
},
{
"idx": 2,
"version": "5",
"when": 1781029240528,
"tag": "0002_yielding_mattie_franklin",
"breakpoints": true
},
{
"idx": 3,
"version": "5",
"when": 1781052360194,
"tag": "0003_same_xavin",
"breakpoints": true
},
{
"idx": 4,
"version": "5",
"when": 1781058250993,
"tag": "0004_mature_maximus",
"when": 1781202409890,
"tag": "0000_baseline",
"breakpoints": true
}
]