fix: Handle existing contact_forms table in migration
This commit is contained in:
parent
18983b178c
commit
3aed0277b9
@ -13,8 +13,12 @@ branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
try:
|
||||
op.add_column('contact_forms', sa.Column('name', sa.String(), nullable=False))
|
||||
op.add_column('contact_forms', sa.Column('message', sa.Text(), nullable=False))
|
||||
except sa.exc.OperationalError:
|
||||
# Table already exists, do nothing
|
||||
pass
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('contact_forms', 'message')
|
||||
|
Loading…
x
Reference in New Issue
Block a user