fix: resolve fatal startup error in SysUser model caused by invalid column type

This commit is contained in:
DXC
2026-03-24 09:38:28 +08:00
parent b5610de1f1
commit 8af460b5d4
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class SysUser(db.Model):
role = db.Column(db.String(50))
status = db.Column(db.String(20), default='active')
password_hash = db.Column(db.Text)
preferences = db.Column(db.JSON, default=dict) # 用户偏好/个性化配置(如齐套监控列表)
preferences = db.Column(db.JSON, nullable=True) # 用户偏好(如齐套监控列表)Python层用 or {} 兜底
created_at = db.Column(db.DateTime, default=beijing_time)
def set_password(self, password):