add CustomDomain.auto_create_regex column
This commit is contained in:
parent
b990c052ac
commit
58d36e9cd8
|
@ -1811,6 +1811,9 @@ class CustomDomain(db.Model, ModelMixin):
|
||||||
# an alias is created automatically the first time it receives an email
|
# 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")
|
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
|
# option to generate random prefix version automatically
|
||||||
random_prefix_generation = db.Column(
|
random_prefix_generation = db.Column(
|
||||||
db.Boolean, nullable=False, default=False, server_default="0"
|
db.Boolean, nullable=False, default=False, server_default="0"
|
||||||
|
|
29
migrations/versions/2021_091716_d8c55e79da54_.py
Normal file
29
migrations/versions/2021_091716_d8c55e79da54_.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: d8c55e79da54
|
||||||
|
Revises: 4d3f91ddf3e9
|
||||||
|
Create Date: 2021-09-17 16:30:23.299011
|
||||||
|
|
||||||
|
"""
|
||||||
|
import sqlalchemy_utils
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'd8c55e79da54'
|
||||||
|
down_revision = '4d3f91ddf3e9'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.add_column('custom_domain', sa.Column('auto_create_regex', sa.String(length=512), nullable=True))
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column('custom_domain', 'auto_create_regex')
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Reference in a new issue