add ForwardEmail.website_from field

This commit is contained in:
Son NK 2019-12-09 22:40:31 +01:00
parent 631900ab4f
commit d160971cc7
2 changed files with 33 additions and 0 deletions

View file

@ -539,6 +539,10 @@ class ForwardEmail(db.Model, ModelMixin):
# used to be envelope header, should be mail header from instead # used to be envelope header, should be mail header from instead
website_email = db.Column(db.String(128), nullable=False) website_email = db.Column(db.String(128), nullable=False)
# the email from header, e.g. AB CD <ab@cd.com>
# nullable as this field is added after website_email
website_from = db.Column(db.String(128), nullable=True)
# when user clicks on "reply", they will reply to this address. # when user clicks on "reply", they will reply to this address.
# This address allows to hide user personal email # This address allows to hide user personal email
# this reply email is created every time a website sends an email to user # this reply email is created every time a website sends an email to user

View file

@ -0,0 +1,29 @@
"""empty message
Revision ID: 2d2fc3e826af
Revises: 5e868298fee7
Create Date: 2019-12-09 22:40:03.692555
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2d2fc3e826af'
down_revision = '5e868298fee7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('forward_email', sa.Column('website_from', sa.String(length=128), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('forward_email', 'website_from')
# ### end Alembic commands ###