mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 10:40:02 +08:00
补全注释SCRIPT中的sql语句
This commit is contained in:
@@ -194,3 +194,12 @@ class GoodsInfo(Model):
|
||||
goods.daily_limit - goods.daily_purchase_limit[group_id][user_id],
|
||||
)
|
||||
return False, 0
|
||||
|
||||
@classmethod
|
||||
def _run_script(cls):
|
||||
return [
|
||||
"ALTER TABLE goods_info ADD daily_limit Integer DEFAULT 0;",
|
||||
"ALTER TABLE goods_info ADD daily_purchase_limit Json DEFAULT '{}';",
|
||||
"ALTER TABLE goods_info ADD is_passive boolean DEFAULT False;",
|
||||
"ALTER TABLE goods_info ADD icon VARCHAR(255);",
|
||||
]
|
||||
|
||||
@@ -22,3 +22,9 @@ class GroupInfo(Model):
|
||||
class Meta:
|
||||
table = "group_info"
|
||||
table_description = "群聊信息表"
|
||||
|
||||
@classmethod
|
||||
def _run_script(cls):
|
||||
return [
|
||||
"ALTER TABLE group_info ADD group_flag Integer NOT NULL DEFAULT 0;" # group_info表添加一个group_flag
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user