From 2b607afc2924bffa648b962638beacfd3c008df8 Mon Sep 17 00:00:00 2001 From: zhiyang7 Date: Wed, 29 Dec 2021 17:04:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=97=E6=AE=B5=E9=95=BF?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- douzero/server/orm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/douzero/server/orm.py b/douzero/server/orm.py index 9e66c45..69bef65 100644 --- a/douzero/server/orm.py +++ b/douzero/server/orm.py @@ -15,9 +15,9 @@ class BaseModel(Model): database = db class Model(BaseModel): - path = CharField(primary_key=True) - position = CharField(null = False) - type = CharField(null = False) + path = CharField(primary_key=True, max_length=255) + position = CharField(null = False, max_length=32) + type = CharField(null = False, max_length=32) frame = IntegerField(null = False) create_time = DateTimeField(null=False) class Meta: @@ -26,8 +26,8 @@ class Model(BaseModel): class Battle(BaseModel): id = PrimaryKeyField() - challenger_path = CharField(null = False, index = True) - challenger_position = CharField(null = False) + challenger_path = CharField(null = False, max_length=255, index = True) + challenger_position = CharField(null = False, max_length=32) opponent_rank = IntegerField(null = False) status = IntegerField(null = False, index = True) challenger_wp = DecimalField(null=True)