Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] Added data migration to deal with DeviceConnection.unique_toget…
…her #846 In PR #806, a unique_together constraint was added to the DeviceConnection model to ensure that adding more than one row with the same device_id and credentials_id in the database is not allowed. However, applying the migration may fail if the database already contains objects that contradict this unique constraint. To address this, we have added a data migration step to remove the conflicting objects from the database before applying the migration. Unfortunately this change may not be fully backward compatible for those who are using the development version, if you incur in any issue while running the migrations, you can fix this with: ./manage.py migrate --fake connection 0009 ./manage.py migrate Fixes #846 Co-authored-by: Federico Capoano <[email protected]>
- Loading branch information