add EmailLog.spam_score column

This commit is contained in:
Son NK 2020-08-16 11:59:53 +02:00
parent d738997c4e
commit 0c6a5f4333
2 changed files with 30 additions and 0 deletions

View File

@ -1173,6 +1173,7 @@ class EmailLog(db.Model, ModelMixin):
# SpamAssassin result
is_spam = db.Column(db.Boolean, nullable=False, default=False, server_default="0")
spam_score = db.Column(db.Float, nullable=True)
spam_status = db.Column(db.Text, nullable=True, default=None)
# Point to the email that has been refused

View File

@ -0,0 +1,29 @@
"""empty message
Revision ID: 95938a93ea14
Revises: 63fd3b240583
Create Date: 2020-08-16 11:50:11.765301
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '95938a93ea14'
down_revision = '63fd3b240583'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('email_log', sa.Column('spam_score', sa.Float(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('email_log', 'spam_score')
# ### end Alembic commands ###