8 lines
273 B
Python
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).") |