mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-02-18 05:00:13 +00:00
more debug
This commit is contained in:
parent
5ed91e1c15
commit
3a348d5d1a
@ -103,13 +103,24 @@ def reinit_db():
|
|||||||
# this is now completely failing to nuke MariaDB adequately, and it crashes when creating Area objects with a no null parent message
|
# 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.
|
# when null parents are explciitly allowed in the model.
|
||||||
cursor = django.db.connection.cursor()
|
cursor = django.db.connection.cursor()
|
||||||
|
print(f" - - Using {cursor}\n")
|
||||||
try:
|
try:
|
||||||
cursor.execute(f"DROP DATABASE {currentdbname}")
|
cursor.execute(f"DROP DATABASE {currentdbname}")
|
||||||
except:
|
except:
|
||||||
print(f" - - Exception when attempting to: DROP DATABASE {currentdbname}\n")
|
print(f" - - Exception when attempting to: DROP DATABASE {currentdbname} with {cursor}\n")
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
cursor.execute(f"CREATE DATABASE {currentdbname}")
|
cursor.execute(f"CREATE DATABASE {currentdbname}")
|
||||||
|
except:
|
||||||
|
print(f" - - Exception when attempting to: CREATE DATABASE {currentdbname} with {cursor}\n")
|
||||||
|
pass
|
||||||
|
try:
|
||||||
cursor.execute(f"ALTER DATABASE {currentdbname} CHARACTER SET=utf8")
|
cursor.execute(f"ALTER DATABASE {currentdbname} CHARACTER SET=utf8")
|
||||||
|
except:
|
||||||
|
print(f" - - Exception when attempting to: ALTER DATABASE {currentdbname} CHARACTER SET=utf8}\n")
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
cursor.execute(f"USE {currentdbname}")
|
cursor.execute(f"USE {currentdbname}")
|
||||||
print(f" - Nuked : {currentdbname}\n")
|
print(f" - Nuked : {currentdbname}\n")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user