Move bootstrap migration INSERT into 000.sql
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().
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user