add custom_domain.spf_verified column

This commit is contained in:
Son NK 2019-12-27 23:44:53 +01:00 committed by Son Nguyen Kim
parent ecdebbe569
commit 34faafe25e
2 changed files with 32 additions and 0 deletions

View File

@ -689,6 +689,9 @@ class CustomDomain(db.Model, ModelMixin):
dkim_verified = db.Column(
db.Boolean, nullable=False, default=False, server_default="0"
)
spf_verified = db.Column(
db.Boolean, nullable=False, default=False, server_default="0"
)
def nb_alias(self):
return GenEmail.filter_by(custom_domain_id=self.id).count()

View File

@ -0,0 +1,29 @@
"""empty message
Revision ID: b0ec969cb693
Revises: d4e4488a0032
Create Date: 2019-12-27 23:43:15.822463
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b0ec969cb693'
down_revision = 'd4e4488a0032'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('custom_domain', sa.Column('spf_verified', sa.Boolean(), server_default='0', nullable=False))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('custom_domain', 'spf_verified')
# ### end Alembic commands ###