mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 00:31:55 +00:00
differences between sqlite and MariaDB
This commit is contained in:
parent
a6ed0997e8
commit
c65544a377
@ -93,12 +93,20 @@ 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':
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
management.call_command('makemigrations','core', interactive=False)
|
management.call_command('makemigrations','core', interactive=False)
|
||||||
management.call_command('makemigrations','flatpages', interactive=False)
|
management.call_command('makemigrations','flatpages', 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)
|
||||||
management.call_command('migrate','flatpages', interactive=False)
|
management.call_command('migrate','flatpages', interactive=False)
|
||||||
|
else:
|
||||||
|
management.call_command('makemigrations','core', interactive=False)
|
||||||
|
management.call_command('makemigrations','flatpages', interactive=False)
|
||||||
|
management.call_command('migrate', interactive=False)
|
||||||
|
management.call_command('migrate','core', interactive=False)
|
||||||
|
management.call_command('migrate','flatpages', interactive=False)
|
||||||
|
|
||||||
|
|
||||||
print(" - done migration on: " + settings.DATABASES['default']['NAME'])
|
print(" - done migration on: " + settings.DATABASES['default']['NAME'])
|
||||||
print("users in db already: ",len(User.objects.all()))
|
print("users in db already: ",len(User.objects.all()))
|
||||||
|
Loading…
Reference in New Issue
Block a user