🐛 : fix uuid

This commit is contained in:
HibiKier
2024-07-21 23:26:56 +08:00
parent 487f019c89
commit c75b0950bd
2 changed files with 5 additions and 4 deletions
-4
View File
@@ -153,10 +153,6 @@ class GoodsInfo(Model):
@classmethod
async def _run_script(cls):
if goods_list := await cls.filter(uuid__isnull=True).all():
for goods in goods_list:
goods.uuid = uuid.uuid1()
await cls.bulk_update(goods_list, ["uuid"], 10)
return [
"ALTER TABLE goods_info ADD uuid VARCHAR(255);",
"ALTER TABLE goods_info ADD daily_limit Integer DEFAULT 0;",