mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
add FLUSH command
This commit is contained in:
parent
9a28e93ac6
commit
3ef5c1aa0b
@ -6,6 +6,8 @@ import sys
|
||||
import time
|
||||
|
||||
import settings
|
||||
from django.core.management import call_command
|
||||
from django.core.management.commands import flush
|
||||
|
||||
""" Command-line utility for loading cave data files into troggle's database.
|
||||
|
||||
@ -124,6 +126,12 @@ def reinit_db():
|
||||
except:
|
||||
print(f" - - Exception when attempting to: USE {currentdbname}")
|
||||
pass
|
||||
try:
|
||||
cmd = flush.Command()
|
||||
call_command(cmd, verbosity=0, interactive=False)
|
||||
except:
|
||||
print(f" - - Exception when attempting to: FLUSH")
|
||||
pass
|
||||
print(f" - Nuked : {currentdbname}\n")
|
||||
|
||||
print(" - Migrating: " + django.db.connections.databases["default"]["NAME"])
|
||||
|
Loading…
Reference in New Issue
Block a user