Handle other strategy for sqlite in Django2.2

This commit is contained in:
David Wobrock committed 2019-07-29 21:05:12 +02:00
1 parent ef2052a7b0
commit 19620d9996
2 files changed
+13 -2

No files matched your search

+4 -2
View File
@@ -83,7 +83,8 @@ sqlite_migration_tests = [
{
"code": "RENAME_TABLE",
"fn": lambda sql, **kw: re.search("ALTER TABLE .* RENAME TO", sql)
and "__old" not in sql,
and "__old" not in sql
and "new__" not in sql,
},
{
"code": "NOT_NULL",
@@ -91,7 +92,8 @@ sqlite_migration_tests = [
re.search("NOT NULL(?! PRIMARY)(?! DEFAULT)", sql) for sql in sql_statements
)
and any(
re.search("ALTER TABLE .* RENAME TO", sql) and "__old" in sql
re.search("ALTER TABLE .* RENAME TO", sql)
and ("__old" in sql or "new__" in sql)
for sql in sql_statements
),
"mode": "transaction",