refactor(db): convert suitable string fields to JSON type

This commit is contained in:
InfinityPacer
2024-09-30 16:16:29 +08:00
parent d69041f049
commit d3186cd742
23 changed files with 52 additions and 70 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import time
from sqlalchemy import Column, Integer, String, Sequence
from sqlalchemy import Column, Integer, String, Sequence, JSON
from sqlalchemy.orm import Session
from app.db import db_query, db_update, Base
@@ -46,7 +46,7 @@ class DownloadHistory(Base):
# 创建时间
date = Column(String)
# 附加信息
note = Column(String)
note = Column(JSON)
@staticmethod
@db_query