updated and removed unecesary files
This commit is contained in:
13
clear_db.py
13
clear_db.py
@@ -1,10 +1,7 @@
|
||||
|
||||
# drop_user_table.py
|
||||
from app import app, db
|
||||
|
||||
def clear_database():
|
||||
with app.app_context():
|
||||
db.drop_all()
|
||||
db.create_all()
|
||||
print("Database cleared and structure recreated.")
|
||||
|
||||
if __name__ == '__main__':
|
||||
clear_database()
|
||||
with app.app_context():
|
||||
db.drop_all()
|
||||
print("Dropped all tables.")
|
||||
Reference in New Issue
Block a user