Skip to content

Commit 9b3bb05

Browse files
committed
fix(db): make 00046.sql a real no-op so migration job passes
1 parent d3a9803 commit 9b3bb05

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/db/migrations/00046.sql

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
-- to be skipped on databases already at schema_version 47.
99
--
1010
-- This placeholder fills the gap so the numbering is contiguous again and the
11-
-- number/index alignment is restored. It performs no schema change:
12-
-- migrate.py strips the file contents and only executes when non-empty, so a
13-
-- comment-only file is a safe no-op that still advances schema_version.
11+
-- number/index alignment is restored. It performs no schema change.
12+
--
13+
-- Note: migrate.py's `apply_migration` does `sql.strip()` and then guards with
14+
-- `if sql:` before calling `cur.execute(sql)`. For a comment-only file,
15+
-- `strip()` does NOT remove SQL comments, so `sql` is a non-empty string
16+
-- containing only `--` lines. psycopg2 then rejects it with
17+
-- `ProgrammingError: can't execute an empty query`, which fails the whole
18+
-- migration job and blocks 00047/00048 from running. A single trivial
19+
-- statement below makes this file a true no-op that psycopg2 accepts.
20+
SELECT 1;

0 commit comments

Comments
 (0)