tablenames-fix

This commit is contained in:
Untone 2024-01-22 22:08:06 +03:00
parent 5ab5928d12
commit 4722bc2300

View File

@ -35,7 +35,7 @@ async def start_up():
inspector = inspect(engine) inspector = inspect(engine)
if not inspector.has_table("notification"): if not inspector.has_table("notification"):
# Create the Notification table # Create the Notification table
Base.metadata.create_all(bind=engine, tables=[Notification.__table__, NotificationSeen.__table__]) Base.metadata.create_all(bind=engine, tables=["notification", "notification_seen"])
logger.info("Notification table was created.") logger.info("Notification table was created.")
else: else:
logger.info("Notification table already exists.") logger.info("Notification table already exists.")