mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 14:17:22 +00:00
transaction incompatible with migrate Django 2+
This commit is contained in:
@@ -95,10 +95,10 @@ def reinit_db():
|
|||||||
print(" - Migrating: " + django.db.connections.databases['default']['NAME'])
|
print(" - Migrating: " + django.db.connections.databases['default']['NAME'])
|
||||||
|
|
||||||
if django.db.connections.databases['default']['ENGINE'] == 'django.db.backends.sqlite3':
|
if django.db.connections.databases['default']['ENGINE'] == 'django.db.backends.sqlite3':
|
||||||
with transaction.atomic():
|
#with transaction.atomic():
|
||||||
management.call_command('makemigrations','core', interactive=False)
|
management.call_command('makemigrations','core', interactive=False)
|
||||||
management.call_command('migrate', interactive=False)
|
management.call_command('migrate', interactive=False)
|
||||||
management.call_command('migrate','core', interactive=False)
|
management.call_command('migrate','core', interactive=False)
|
||||||
else:
|
else:
|
||||||
management.call_command('makemigrations','core', interactive=False)
|
management.call_command('makemigrations','core', interactive=False)
|
||||||
management.call_command('migrate', interactive=False)
|
management.call_command('migrate', interactive=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user