mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 20:47:09 +00:00
No speedup for database init.
This commit is contained in:
@@ -85,12 +85,11 @@ def reinit_db():
|
|||||||
else:
|
else:
|
||||||
print(" - No database file found: " + currentdbname + " ..continuing, will create it.\n")
|
print(" - No database file found: " + currentdbname + " ..continuing, will create it.\n")
|
||||||
else:
|
else:
|
||||||
with transaction.atomic():
|
cursor = django.db.connection.cursor()
|
||||||
cursor = django.db.connection.cursor()
|
cursor.execute("DROP DATABASE %s" % currentdbname)
|
||||||
cursor.execute("DROP DATABASE %s" % currentdbname)
|
cursor.execute("CREATE DATABASE %s" % currentdbname)
|
||||||
cursor.execute("CREATE DATABASE %s" % currentdbname)
|
cursor.execute("ALTER DATABASE %s CHARACTER SET=utf8" % currentdbname)
|
||||||
cursor.execute("ALTER DATABASE %s CHARACTER SET=utf8" % currentdbname)
|
cursor.execute("USE %s" % currentdbname)
|
||||||
cursor.execute("USE %s" % currentdbname)
|
|
||||||
|
|
||||||
print(" - Migrating: " + django.db.connections.databases['default']['NAME'])
|
print(" - Migrating: " + django.db.connections.databases['default']['NAME'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user