Closed moritz89 closed 7 months ago
Hi,
Thanks for taking interest in the project!
That's linked to the way {unique,index}_together
is implemented on Django side.
Those constraints need to query the Database to retrieve the actual index name when deleting them, so that they can build the corresponding SQL query.
So when we are generating the SQL for a migration deleting such a constraint, it might be that the constraint has been deleted long ago (or that it has not been created yet, if the DB is created from scratch).
For now, the best option is indeed to ignore sqlmigrate errors, or to ignore this one migration specifically.
I hope this helps :)
This has been mentioned in #66 but seems to be present, at least in version
5.1.0
. Linting a migration that drops the unique_together constraint will result in the following error and then abort the linting process. The error occurred in django-address, but also in our app's migrations.A work-around is to run the linter with
--ignore-sqlmigrate-errors
but I guess this might ignore other things as well. Is this the intended behavior?