diff --git a/cmd/ingestor/async_migration_progress.go b/cmd/ingestor/async_migration_progress.go index 17ee349b..21721b0d 100644 --- a/cmd/ingestor/async_migration_progress.go +++ b/cmd/ingestor/async_migration_progress.go @@ -44,6 +44,7 @@ func ensureAsyncMigrationProgressColumns(db *sql.DB) error { {"last_update_at", "TEXT"}, } for _, c := range cols { + // PREFLIGHT: async=true reason="_async_migrations is the migration bookkeeping table itself — bounded to one row per known migration name (single-digit rows in practice, never grows with data). ALTER TABLE ADD COLUMN on this table is O(rows) and completes in microseconds even on prod-size DBs." _, err := db.Exec(fmt.Sprintf( `ALTER TABLE _async_migrations ADD COLUMN %s %s`, c.name, c.typ)) if err != nil && !isDuplicateColumnErr(err) { diff --git a/cmd/server/async_migrations_test.go b/cmd/server/async_migrations_test.go index 0a9c48eb..4a413da6 100644 --- a/cmd/server/async_migrations_test.go +++ b/cmd/server/async_migrations_test.go @@ -18,6 +18,7 @@ func openAsyncTestDB(t *testing.T) *sql.DB { t.Fatal(err) } t.Cleanup(func() { db.Close() }) + // PREFLIGHT: async=true reason="test fixture CREATE TABLE on a fresh in-memory SQLite DB — not a real schema migration; runs in test setup only." _, err = db.Exec(` CREATE TABLE _async_migrations ( name TEXT PRIMARY KEY,