This repository has been archived on 2025-12-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
safe-marks-server/create_db.py
Julian Freeman b4ee793b6f add docker
2025-10-18 15:34:41 -04:00

8 lines
273 B
Python

from api_server import Base, engine
print("Creating database and tables...")
# create_all 会检查表是否存在,只创建不存在的表
Base.metadata.create_all(bind=engine, checkfirst=True)
print("Database and tables created successfully (if they didn't exist).")