Tweak the uuid backfill to leave the uuid column nullable.
This commit is contained in:
parent
7c8a438b58
commit
e863b96166
3 changed files with 11 additions and 10 deletions
|
@ -137,7 +137,7 @@ class BaseModel(ReadSlaveModel):
|
|||
|
||||
|
||||
class User(BaseModel):
|
||||
uuid = CharField(default=uuid_generator, max_length=36)
|
||||
uuid = CharField(default=uuid_generator, max_length=36, null=True)
|
||||
username = CharField(unique=True, index=True)
|
||||
password_hash = CharField(null=True)
|
||||
email = CharField(unique=True, index=True,
|
||||
|
|
|
@ -15,8 +15,9 @@ import sqlalchemy as sa
|
|||
from sqlalchemy.dialects import mysql
|
||||
from util.backfill_user_uuids import backfill_user_uuids
|
||||
|
||||
|
||||
def upgrade(tables):
|
||||
op.add_column('user', sa.Column('uuid', sa.String(length=36), nullable=False))
|
||||
op.add_column('user', sa.Column('uuid', sa.String(length=36), nullable=True))
|
||||
backfill_user_uuids()
|
||||
|
||||
|
||||
|
|
Reference in a new issue