File size: 364 Bytes
2a2578f
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from src.database.models import Base, engine, BreakingNews
try:
    BreakingNews.__table__.create(bind=engine)
    print("BreakingNews table created successfully.")
except Exception as e:
    print(f"Error creating table: {e}")

from sqlalchemy import inspect
inspector = inspect(engine)
print("Updated Tables in database:", inspector.get_table_names())