Kamixitong/check_order_table.py
2025-11-19 22:49:24 +08:00

14 lines
378 B
Python

from app import create_app
from app.models import Order
app = create_app()
with app.app_context():
try:
order = Order.query.first()
if order:
print("Order table exists and has data")
else:
print("Order table exists but is empty")
except Exception as e:
print(f"Order table does not exist or error occurred: {e}")