Move schema_migrations table creation into 000.sql #36

Open
clawbot wants to merge 5 commits from feature/migrations-table-schema-file into main
2 changed files with 2 additions and 8 deletions
Showing only changes of commit 2074571a87 - Show all commits

View File

@@ -177,14 +177,6 @@ func bootstrapMigrationsTable(ctx context.Context, db *sql.DB, log *slog.Logger)
return fmt.Errorf("failed to apply bootstrap migration: %w", err)
}
_, err = db.ExecContext(ctx,
"INSERT INTO schema_migrations (version) VALUES (?)",
bootstrapVersion,
)
if err != nil {
return fmt.Errorf("failed to record bootstrap migration: %w", err)
}
return nil
}

View File

@@ -5,3 +5,5 @@ 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');