Do not lock table on SQLite when checking unsupported constraint
It is not needed as SQLite does not have an explicit lock mechanism but such call restart the transaction anyway.
This commit is contained in:
@@ -2187,7 +2187,8 @@ class ModelSQL(ModelStorage):
|
||||
continue
|
||||
table = sql.table
|
||||
if isinstance(sql, (Unique, Exclude)):
|
||||
cls.lock()
|
||||
if backend.name != 'sqlite':
|
||||
cls.lock()
|
||||
if not database.has_range():
|
||||
columns = []
|
||||
for col in sql.columns:
|
||||
|
||||
Reference in New Issue
Block a user