Per review: the SQL file should be self-contained. 000.sql now includes both the CREATE TABLE and the INSERT OR IGNORE for recording its own version. Removed the separate INSERT from Go code in bootstrapMigrationsTable().
10 lines
314 B
SQL
10 lines
314 B
SQL
-- Migration 000: Schema migrations tracking table
|
|
-- Applied as a bootstrap step before the normal migration loop.
|
|
|
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
version TEXT PRIMARY KEY,
|
|
applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
INSERT OR IGNORE INTO schema_migrations (version) VALUES ('000');
|