add backend source code
This commit is contained in:
19
backend/create_plan_tables.py
Normal file
19
backend/create_plan_tables.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
创建绩效计划管理表
|
||||
"""
|
||||
import asyncio
|
||||
from app.core.database import engine, Base
|
||||
from app.models.models import PerformancePlan, PlanKpiRelation
|
||||
|
||||
|
||||
async def create_tables():
|
||||
"""创建绩效计划管理相关表"""
|
||||
async with engine.begin() as conn:
|
||||
# 创建所有表
|
||||
await conn.run_sync(Base.metadata.create_all)
|
||||
|
||||
print("绩效计划管理表创建成功!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(create_tables())
|
||||
Reference in New Issue
Block a user