fixing docker migration path

This commit is contained in:
orangecoding
2025-09-18 17:28:30 +02:00
parent 8d95f052c6
commit 28f0a167e6
7 changed files with 207 additions and 209 deletions

View File

@@ -0,0 +1,16 @@
// Initial migration: creates schema_migrations table used by the migration runner.
//
export function up(db) {
db.exec(`
CREATE TABLE IF NOT EXISTS schema_migrations (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL UNIQUE,
checksum TEXT NOT NULL,
applied_at TEXT NOT NULL DEFAULT (datetime('now')),
duration_ms INTEGER NOT NULL DEFAULT 0
);
CREATE INDEX IF NOT EXISTS idx_schema_migrations_applied_at
ON schema_migrations(applied_at);
`);
}