fix fk stuff being outside of the main migration check

This commit is contained in:
aronwk-aaron 2023-03-04 00:09:35 -06:00
parent ee65f67fe3
commit b17928b050

View File

@ -77,11 +77,11 @@ def upgrade():
sa.Column('created_at', mysql.TIMESTAMP(), server_default=sa.text('now()'), nullable=False),
sa.Column('play_key_id', mysql.INTEGER(), nullable=True),
sa.Column('mute_expire', mysql.BIGINT(unsigned=True), server_default='0', nullable=False),
sa.ForeignKeyConstraint(['play_key_id'], ['play_keys.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('name')
)
op.create_foreign_key(None, 'accounts', 'play_keys', ['play_key_id'], ['id'], ondelete='CASCADE')
op.add_column('accounts', sa.Column('active', sa.BOOLEAN(), server_default='1', nullable=False))
op.add_column('accounts', sa.Column('email_confirmed_at', sa.DateTime(), nullable=True))
op.add_column('accounts', sa.Column('email', sa.Unicode(length=255), server_default='', nullable=True))