调整字段长度

This commit is contained in:
zhiyang7 2021-12-29 17:04:43 +08:00
parent b2dd98cc30
commit 2b607afc29
1 changed files with 5 additions and 5 deletions

View File

@ -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)