mirror of
https://github.com/simple-login/app.git
synced 2025-02-25 00:03:03 +08:00
Create InvalidMailboxDomain model
This commit is contained in:
parent
414f6a2463
commit
4332fd3244
2 changed files with 44 additions and 0 deletions
|
@ -2702,6 +2702,14 @@ class DeletedSubdomain(Base, ModelMixin):
|
|||
domain = sa.Column(sa.String(128), unique=True, nullable=False)
|
||||
|
||||
|
||||
class InvalidMailboxDomain(Base, ModelMixin):
|
||||
"""Domains that can't be used as mailbox"""
|
||||
|
||||
__tablename__ = "invalid_mailbox_domain"
|
||||
|
||||
domain = sa.Column(sa.String(256), unique=True, nullable=False)
|
||||
|
||||
|
||||
# region Phone
|
||||
class PhoneCountry(Base, ModelMixin):
|
||||
__tablename__ = "phone_country"
|
||||
|
|
36
migrations/versions/2022_010310_3d05479d0d11_.py
Normal file
36
migrations/versions/2022_010310_3d05479d0d11_.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: 3d05479d0d11
|
||||
Revises: d8a3dfe674f2
|
||||
Create Date: 2022-01-03 10:25:00.673761
|
||||
|
||||
"""
|
||||
import sqlalchemy_utils
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '3d05479d0d11'
|
||||
down_revision = 'd8a3dfe674f2'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('invalid_mailbox_domain',
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
||||
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
|
||||
sa.Column('domain', sa.String(length=256), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('domain')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('invalid_mailbox_domain')
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in a new issue