File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ;
You can’t perform that action at this time.
0 commit comments