Skip to content

Add migrate command - #19

Merged
aersam merged 2 commits into
mainfrom
add-migrate-command
Aug 27, 2026
Merged

aersam merged 2 commits into
mainfrom
add-migrate-command

Conversation

@aersam

@aersam aersam commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

aersam and others added 2 commits August 25, 2026 15:42
Ports a per-project migration runner into pgdevkit as `pgdevkit.migrate`
(usable as a library) plus `pgdb migrate check`/`apply`. Verifies each
CREATE TABLE statement's target actually exists after applying (via
sqlglot's AST, falling back to regex on comment-stripped text only when
sqlglot can't parse a statement) so a CREATE TABLE mentioned only in a
`--` comment is never mistaken for a real one. The tracking table
defaults to dim.migrations and is configurable via
[tool.pgdevkit].migrations_table in pyproject.toml or --tracking-table.
…tion

Migrations now run on a background worker (still strictly in file order)
while --ask keeps prompting for the next file, instead of blocking each
review on the previous migration finishing. Progress is shown via a tqdm
bar; a failure stops the queue and the review loop, and a summary table
lists every file's outcome.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MsW4bjEgHHQKvmCReYzyNg
@aersam
aersam merged commit e00b37d into main Aug 27, 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

Development

Successfully merging this pull request may close these issues.

1 participant