Skip to content

Make PostgresModelDataMigrator work for scheduled rebuilds of a table - #289

Merged
Photonios merged 5 commits into
masterfrom
clone-fk-without-db-constraint
Oct 2, 2026
Merged

Photonios merged 5 commits into
masterfrom
clone-fk-without-db-constraint

Conversation

@Photonios

@Photonios Photonios commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor
  • Don't clone the foreign key constraint of a field with db_constraint=False. clone_model_constraints_and_indexes_to_schema looked up a constraint that does not exist and the unpack raised a ValueError, so the migrator could not migrate such a model at all

  • Delete the work and backup schemas when a phase fails. They were left behind, half-filled, on every failed migration

  • Add keep_backup_schema, default on. Turned off, the backup schema is deleted after a successful migration, so a migration that runs every day does not leave a copy of the table behind on every run

  • Move the CI images from bullseye to bookworm. The bullseye security packages are gone from the Debian mirrors, so installing packages failed every job

  • Fix release.yml not parsing, which failed a run on every push and would have failed a release. Its version check also used [[, which the container's default sh does not have

@Photonios Photonios changed the title Don't clone the foreign key constraint of a field with db_constraint=False Make PostgresModelDataMigrator work for scheduled rebuilds of a table Oct 2, 2026
@Photonios
Photonios marked this pull request as ready for review October 2, 2026 19:33
@Photonios
Photonios merged commit 7697978 into master Oct 2, 2026
8 checks passed
@Photonios
Photonios deleted the clone-fk-without-db-constraint branch October 2, 2026 19:33
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