summaryrefslogtreecommitdiffstats
path: root/databaseReset.py
diff options
context:
space:
mode:
Diffstat (limited to 'databaseReset.py')
-rw-r--r--databaseReset.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/databaseReset.py b/databaseReset.py
index 1d8427b..ae1ea55 100644
--- a/databaseReset.py
+++ b/databaseReset.py
@@ -89,11 +89,15 @@ def reinit_db():
else:
print(" - No database file found: " + currentdbname + " ..continuing, will create it.\n")
else:
+ print(f" - Attempting to nuke : {currentdbname}\n")
+ # this is now completely failing to nuke MariaDB adequately, and it crashes when creating Area objects with a no null parent message
+ # when null parents are explciitly allowed in the model.
cursor = django.db.connection.cursor()
cursor.execute("DROP DATABASE %s" % currentdbname)
cursor.execute("CREATE DATABASE %s" % currentdbname)
cursor.execute("ALTER DATABASE %s CHARACTER SET=utf8" % currentdbname)
cursor.execute("USE %s" % currentdbname)
+ print(f" - Nuked : {currentdbname}\n")
print(" - Migrating: " + django.db.connections.databases['default']['NAME'])