Move bootstrap migration INSERT into 000.sql
check / check (push) Successful in 1m41s

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().
Этот коммит содержится в:
clawbot
2026-03-17 20:21:32 -07:00
родитель 8b6aa74951
Коммит 0c8de65be8
2 изменённых файлов: 2 добавлений и 8 удалений
-8
Просмотреть файл
@@ -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
}
+2
Просмотреть файл
@@ -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');