You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Django alters anything on a foreign key column it will first drop the foreign key constraint, then make the schema changes, before finally re-adding the foreign key constraint. This requires an additional access exclusive lock that's not needed when just changing the nullability of the column.
When Django alters anything on a foreign key column it will first drop the foreign key constraint, then make the schema changes, before finally re-adding the foreign key constraint. This requires an additional access exclusive lock that's not needed when just changing the nullability of the column.
For example this migration:
Will generate this SQL:
However, just running the alter schema query will achieve the same and not lock the referenced table:
The text was updated successfully, but these errors were encountered: