forked from sneak/upaas
fix: rename 000.sql to 000_migration.sql and wrap legacy conversion in transaction
- Rename bootstrap migration from 000.sql to 000_migration.sql per REPO_POLICIES.md naming convention (NNN_description.sql pattern) - Update all hardcoded references in migrations.go - Wrap rebuildMigrationsTable() DROP/CREATE/INSERT sequence in a single transaction for crash safety - Update test case filename to match renamed file
This commit is contained in:
9
internal/database/migrations/000_migration.sql
Normal file
9
internal/database/migrations/000_migration.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Migration 000: Schema migrations tracking table
|
||||
-- Applied as a bootstrap step before the normal migration loop.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS schema_migrations (
|
||||
version INTEGER PRIMARY KEY,
|
||||
applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
INSERT OR IGNORE INTO schema_migrations (version) VALUES (0);
|
||||
Reference in New Issue
Block a user