feat: 加入状态字段标记不可见和已失效视频,标记后不做重复处理

This commit is contained in:
amtoaer
2023-11-25 13:13:51 +08:00
parent be6b8eaa89
commit 5629dcce69
5 changed files with 60 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
from tortoise import BaseDBAsyncClient
async def upgrade(db: BaseDBAsyncClient) -> str:
return """
ALTER TABLE "favoriteitem" ADD "status" SMALLINT NOT NULL DEFAULT 1 /* NORMAL: 1\nINVISIBLE: 2\nDELETED: 3 */;"""
async def downgrade(db: BaseDBAsyncClient) -> str:
return """
ALTER TABLE "favoriteitem" DROP COLUMN "status";"""