Migratiaon 0093 deletes all tracker history... what else? #1116
Replies: 3 comments
-
|
this checks out as a real migration-ordering risk. I only checked the cloned source/static migration graph at So unless something else has already forced manager 0079 to run first, providers 0093 can hit the old FK graph and delete tracking rows, including their stored |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @ChrisNolan, and @sueun-dev for confirming against the migration graph. You are right — this was an omission. Deleting the legacy What we will do:
On the 60k events, I hope you had a backup to restore from — if not, let me know and I will help work out what is recoverable. Sorry for the loss, and thanks for flagging it. |
Beta Was this translation helpful? Give feedback.
-
|
Marta's #1123 raises some other migration concerns as well which might be worth a look when reviewing this one as well. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Heads up: migration
providers/0093_migrate_system_carriers_data.pyappears to have a destructive side effect that is not clearly called out in the changelog.At the end of the migration, each
Carrierrow withis_system=Trueis deleted after being moved toSystemConnection. Because that is a normal model delete, it can cascade through foreign-key relationships and delete associated data as well.In my case, this resulted in about 60k tracking events being deleted.
The original PRD (
PRDs/CARRIER_CONNECTION_ARCHITECTURE_UPGRADE.md) does say this migration is “MOVE data, not copy” and “forward-only,” with manual rollback intervention needed. The production architecture doc also listsproviders/0093as “Migrate system carriers data.” However, the changelog entry aroundKarrio 2026.1.2only mentions “connections management for better data normalization and optimized reads,” which does not really warn operators that existing related data may be deleted via FK cascades.Could this be documented more explicitly in the release notes / migration notes, and ideally guarded or changed so deleting the legacy carrier row does not cascade-delete historical data like tracking events? And future migrations to consider these cascades and appropriate move the records that are being rekeyed perhaps?
Beta Was this translation helpful? Give feedback.
All reactions