remove CustomDomain.auto_create_regex

This commit is contained in:
Son Nguyen Kim 2021-09-21 09:48:07 +02:00
parent e5a8ce1492
commit 809f547742
2 changed files with 29 additions and 3 deletions

View File

@ -1807,9 +1807,6 @@ class CustomDomain(db.Model, ModelMixin):
# an alias is created automatically the first time it receives an email
catch_all = db.Column(db.Boolean, nullable=False, default=False, server_default="0")
# an alias is auto created if it matches the regex
auto_create_regex = db.Column(db.String(512), nullable=True)
# option to generate random prefix version automatically
random_prefix_generation = db.Column(
db.Boolean, nullable=False, default=False, server_default="0"

View File

@ -0,0 +1,29 @@
"""empty message
Revision ID: 7a105bfc0cd0
Revises: cf1e8c1bc737
Create Date: 2021-09-20 18:41:43.017908
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7a105bfc0cd0'
down_revision = 'cf1e8c1bc737'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('custom_domain', 'auto_create_regex')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('custom_domain', sa.Column('auto_create_regex', sa.VARCHAR(length=512), autoincrement=False, nullable=True))
# ### end Alembic commands ###