SubscribeHistory 表结构修复

This commit is contained in:
jxxghp
2024-10-21 13:07:47 +08:00
parent b07297c7e1
commit eeed9849ef
4 changed files with 55 additions and 18 deletions

View File

@@ -58,12 +58,12 @@ class ConfigModel(BaseModel):
DB_POOL_TYPE: str = "QueuePool"
# 是否在获取连接时进行预先 ping 操作,默认关闭
DB_POOL_PRE_PING: bool = False
# 数据库连接池的大小,默认 20
DB_POOL_SIZE: int = 20
# 数据库连接池的大小,默认 100
DB_POOL_SIZE: int = 100
# 数据库连接的回收时间(秒),默认 1800 秒
DB_POOL_RECYCLE: int = 1800
# 数据库连接池获取连接的超时时间(秒),默认 30 秒
DB_POOL_TIMEOUT: int = 30
# 数据库连接池获取连接的超时时间(秒),默认 60 秒
DB_POOL_TIMEOUT: int = 60
# 数据库连接池最大溢出连接数,默认 10
DB_MAX_OVERFLOW: int = 10
# SQLite 的 busy_timeout 参数,默认为 60 秒

View File

@@ -1,4 +1,4 @@
from sqlalchemy import Column, Integer, String, Sequence, Float
from sqlalchemy import Column, Integer, String, Sequence, Float, JSON
from sqlalchemy.orm import Session
from app.db import db_query, Base
@@ -53,13 +53,19 @@ class SubscribeHistory(Base):
# 订阅用户
username = Column(String)
# 订阅站点
sites = Column(String)
sites = Column(JSON)
# 是否洗版
best_version = Column(Integer, default=0)
# 保存路径
save_path = Column(String)
# 是否使用 imdbid 搜索
search_imdbid = Column(Integer, default=0)
# 自定义识别词
custom_words = Column(String)
# 自定义媒体类别
media_category = Column(String)
# 过滤规则组
filter_groups = Column(JSON, default=list)
@staticmethod
@db_query