transaction incompatible with migrate Django 2+

This commit is contained in:
Philip Sargent 2021-04-04 01:44:41 +01:00
parent c08356876d
commit 53fef14024

View File

@ -95,10 +95,10 @@ def reinit_db():
print(" - Migrating: " + django.db.connections.databases['default']['NAME'])
if django.db.connections.databases['default']['ENGINE'] == 'django.db.backends.sqlite3':
with transaction.atomic():
management.call_command('makemigrations','core', interactive=False)
management.call_command('migrate', interactive=False)
management.call_command('migrate','core', interactive=False)
#with transaction.atomic():
management.call_command('makemigrations','core', interactive=False)
management.call_command('migrate', interactive=False)
management.call_command('migrate','core', interactive=False)
else:
management.call_command('makemigrations','core', interactive=False)
management.call_command('migrate', interactive=False)