chore: 清理 Docker 相关文件并优化前端布局
- 删除 Docker 相关文件 (docker-compose, Dockerfile, nginx.conf, init.sql 等) - 优化 platforms.html 卡片布局和响应式样式 - 优化 users.html 格式和移动端卡片设计 - 优化 admin.html 页面结构和表格布局 - 修复各页面 min-height 和溢出问题 - 更新导航组件样式
This commit is contained in:
@@ -38,6 +38,14 @@ Base = declarative_base()
|
||||
|
||||
def init_db():
|
||||
Base.metadata.create_all(bind=engine)
|
||||
# 迁移:为已有表添加 last_login 列
|
||||
try:
|
||||
from sqlalchemy import text
|
||||
with engine.connect() as conn:
|
||||
conn.execute(text("ALTER TABLE users ADD COLUMN IF NOT EXISTS last_login TIMESTAMP"))
|
||||
conn.commit()
|
||||
except Exception:
|
||||
pass # SQLite 不支持 IF NOT EXISTS,但 create_all 对 SQLite 够用
|
||||
|
||||
def get_db():
|
||||
db = SessionLocal()
|
||||
|
||||
Reference in New Issue
Block a user