fix: 移除last_login字段映射以适配A环境数据库

This commit is contained in:
龙大 2026-03-20 20:34:03 +08:00
parent 3d8a5dd142
commit b093c44619
2 changed files with 13 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class User(Base):
bio = Column(Text, nullable=True)
password = Column(String(255), nullable=False)
role = Column(String(50), default="user")
last_login = Column(DateTime(timezone=True), nullable=True) # 最后登录时间
# last_login = Column(DateTime(timezone=True), nullable=True)
f99_92_created_at = Column(DateTime(timezone=True), server_default=func.now())
f99_93_updated_at = Column(DateTime(timezone=True), onupdate=func.now())

12
start.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
cd /root/jiachenlong/backend
export DATABASE_URL=postgresql://caibot:caibot123@47.98.171.101:5432/zodiac
export SECRET_KEY=production-secret-key-a-env
export OSS_ACCESS_KEY_ID=LTAI5t6HUnpFBLEK9194kPVG
export OSS_ACCESS_KEY_SECRET=LEr4Q8yRxb8D5b24cKfCwlt4MMoke1
export SMS_ACCESS_KEY_ID=LTAI5tQAx5niD7JQVqGE5acE
export SMS_ACCESS_KEY_SECRET=QsQFAEKBkaNynIoKyvdIi3BUyWVZu1
export SMS_SIGN_NAME=苏州算力
export SMS_TEMPLATE_CODE=SMS_501590956
nohup python3 -m uvicorn app.main:app --host 0.0.0.0 --port 3000 > /tmp/uvicorn.log 2>&1 &
echo "后端服务已启动"