Skip to content

Add Database Migration Verification and CI Health Check Script Enhancements - #479

Merged
Cjay-Cyber-2 merged 5 commits into
ASTROIDX556:mainfrom
kimmoris12345:add-database-migration
Oct 22, 2026
Merged

Cjay-Cyber-2 merged 5 commits into
ASTROIDX556:mainfrom
kimmoris12345:add-database-migration

Conversation

@kimmoris12345

@kimmoris12345 kimmoris12345 commented Oct 22, 2026 •

Copy link
Copy Markdown

Closes #406
Closes #407
Closes #408
Closes #410

…ssifier

The verification script classified statements line by line and read the
table and index names from the masked statement, so a quoted identifier
was never recognised: the advisory for an index built without
CONCURRENTLY never fired, and an indented ALTER TABLE was not matched at
all.

- analyse every statement as a whole (multi-line statements and leading
  whitespace included) and read the object names from the unmasked text
- reject destructive statements unless the migration opts in with
  '-- astroid:allow-destructive <reason>'; a migration that is already
  merged cannot be changed any more and is only reported as a warning
- reject ADD COLUMN ... NOT NULL without DEFAULT, which fails as soon as
  the table holds rows
- enforce the CREATE INDEX CONCURRENTLY rules of docs/concurrent-indexes.md
- reject leftovers of an interrupted merge and unresolved conflict markers
  in a migration folder
The suite still expected destructive statements to be a warning. It now
covers the forbidden, destructive and unsafe statement checks, the
explicit opt-in, the concurrent index rules and the merge artefacts of a
migration folder.
@Cjay-Cyber-2
Cjay-Cyber-2 merged commit f912f0d into ASTROIDX556:main Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants