db: fix migration for existing schema_migrations without checksum column
- Add 0007 migration to ALTER TABLE adding checksum column - Make migration runner INSERT conditional: if checksum col exists, use it; otherwise omit - Handles existing databases (no checksum col) and fresh installs (has checksum col) correctly
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- Migration 0007: Add checksum column to schema_migrations.
|
||||
-- This migration is idempotent and safe to re-run.
|
||||
-- For existing databases (pre-1.0.54): ALTER TABLE adds the checksum column.
|
||||
-- For fresh databases (1.0.54+): 0001_init.sql now creates the table with checksum column.
|
||||
-- This migration handles the upgrade path only.
|
||||
|
||||
ALTER TABLE schema_migrations ADD COLUMN checksum TEXT DEFAULT '';
|
||||
Reference in New Issue
Block a user