DecisionTree/recreate_db.py

8 lines
209 B
Python

from app import app, db
with app.app_context():
# Drop all tables
db.drop_all()
# Create all tables with the updated schema
db.create_all()
print("Database recreated with updated schema")