Skip to content

Add SQL previews for db_migration dry runs#27

Merged
codeboost-tr merged 2 commits into
codeboost-tr:mainfrom
shaiananvari8:codex/db-migration-dry-run-17
Jun 19, 2026
Merged

Add SQL previews for db_migration dry runs#27
codeboost-tr merged 2 commits into
codeboost-tr:mainfrom
shaiananvari8:codex/db-migration-dry-run-17

Conversation

@shaiananvari8

Copy link
Copy Markdown

/claim #17

Summary

  • Adds real SQL previews for db_migration.py --dry-run instead of only listing pending migrations.
  • Routes rollback through the same dry-run path so --down --version ... --dry-run does not touch the database.
  • Keeps execution behavior unchanged when dry-run is not set.
  • Adds ools/validate_db_migration_dry_run.py to assert dry-run never calls SQL execution and shows both INSERT and DELETE statements.

Validation

  • python -m py_compile build.py tools/db_migration.py tools/validate_db_migration_dry_run.py
  • python tools/validate_db_migration_dry_run.py
  • python tools/db_migration.py --down --version 20210101000000 --dry-run
  • git diff --check origin/main...HEAD
  • python build.py was run; local module builds fail because the Windows environment is missing the repo's language toolchains. The generated JSON diagnostic is committed, and a matching fallback .logd records the build result because the bundled Windows encryptly tool returned a token but did not write the encrypted file here.

@opirebot

opirebot Bot commented Jun 19, 2026

Copy link
Copy Markdown

😅 Ups... the issue does not have any reward yet!

@codeboost-tr codeboost-tr merged commit 967693f into codeboost-tr:main Jun 19, 2026
1 check 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.

2 participants