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)