diff --git a/app/models.py b/app/models.py index 32025acc..b92553fb 100644 --- a/app/models.py +++ b/app/models.py @@ -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" diff --git a/migrations/versions/2022_010310_3d05479d0d11_.py b/migrations/versions/2022_010310_3d05479d0d11_.py new file mode 100644 index 00000000..bc350a63 --- /dev/null +++ b/migrations/versions/2022_010310_3d05479d0d11_.py @@ -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 ###