From 809f54774212c064e80c1b188157ea21a1535054 Mon Sep 17 00:00:00 2001 From: Son Nguyen Kim Date: Tue, 21 Sep 2021 09:48:07 +0200 Subject: [PATCH] remove CustomDomain.auto_create_regex --- app/models.py | 3 -- .../versions/2021_092018_7a105bfc0cd0_.py | 29 +++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 migrations/versions/2021_092018_7a105bfc0cd0_.py diff --git a/app/models.py b/app/models.py index 7fc862dc..531ffeab 100644 --- a/app/models.py +++ b/app/models.py @@ -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" diff --git a/migrations/versions/2021_092018_7a105bfc0cd0_.py b/migrations/versions/2021_092018_7a105bfc0cd0_.py new file mode 100644 index 00000000..250b0f88 --- /dev/null +++ b/migrations/versions/2021_092018_7a105bfc0cd0_.py @@ -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 ###