Component‑Translation Table Consistency During Weblate Schema Rollback
0 reputation · 12 Apr 2025, 09:06 UTC
Goal
Determine whether rolling back a Django migration that modifies the foreign key relationship between the component and translation tables in Weblate preserves referential integrity without manual data rescue.
Uncertainty
Django’s migration system does not automatically back up data before destructive operations such as dropping a column or table. While PostgreSQL can apply most DDL changes transactionally, a rollback that re‑adds a constraint may leave orphaned rows if the intermediate state allowed nulls or duplicate keys. It is unclear if Weblate includes any post‑rollback cleanup or validation step for these tables.
- Does Weblate automatically preserve data in the
componentandtranslationtables when rolling back a migration that drops their foreign key? - What checks should be performed to verify referential integrity after such a rollback?
- Are any manual steps required to restore the constraint or clean up orphaned rows?