feat(db): update model to support JSON

This commit is contained in:
InfinityPacer
2024-09-30 03:07:33 +08:00
parent 7c643432ee
commit daadfcffd8
12 changed files with 20 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
from sqlalchemy import Column, Integer, String, Sequence, UniqueConstraint, Index
from sqlalchemy import Column, Integer, String, Sequence, UniqueConstraint, Index, JSON
from sqlalchemy.orm import Session
from app.db import db_query, db_update, Base
@@ -14,7 +14,7 @@ class UserConfig(Base):
# 配置键
key = Column(String)
# 值
value = Column(String, nullable=True)
value = Column(JSON, nullable=True)
__table_args__ = (
# 用户名和配置键联合唯一