🐛 修复迁移旧版数据库失败的BUG

This commit is contained in:
2025-05-26 15:10:12 +08:00
parent cca3dc5d4d
commit c131692b19
15 changed files with 345 additions and 119 deletions
+3 -6
View File
@@ -8,13 +8,10 @@ from .database import CSqlManager
class CUserPlantDB(CSqlManager):
@classmethod
async def initDB(cls):
#用户UiD
#作物名称
#数量
userPlant = {
"uid": "INTEGER NOT NULL",
"plant": "TEXT NOT NULL",
"count": "INTEGER NOT NULL DEFAULT 0",
"uid": "TEXT NOT NULL", #用户Uid
"plant": "TEXT NOT NULL", #作物名称
"count": "INTEGER NOT NULL DEFAULT 0", #数量
"PRIMARY KEY": "(uid, plant)"
}