From 6f93554e7e6265394b039eb0d0a9d33ba59d97fc Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Thu, 7 Oct 2021 09:23:58 -0400 Subject: [PATCH] Migration script for new email columns !!!This will need to be merged with another migration happening in another ticket concurrently!!! --- .../25f846183f1c_new_email_attributes.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 migrations/versions/25f846183f1c_new_email_attributes.py diff --git a/migrations/versions/25f846183f1c_new_email_attributes.py b/migrations/versions/25f846183f1c_new_email_attributes.py new file mode 100644 index 00000000..74c96bb2 --- /dev/null +++ b/migrations/versions/25f846183f1c_new_email_attributes.py @@ -0,0 +1,30 @@ +"""new-email-attributes + +Revision ID: 25f846183f1c +Revises: 5c63a89ee7b7 +Create Date: 2021-10-06 10:11:37.963712 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '25f846183f1c' +down_revision = '5c63a89ee7b7' +branch_labels = None +depends_on = None + + +def upgrade(): + op.add_column('email', sa.Column('cc', sa.String(), nullable=True)) + op.add_column('email', sa.Column('bcc', sa.String(), nullable=True)) + op.add_column('email', sa.Column('timestamp', sa.DateTime())) + op.add_column('email', sa.Column('workflow_id', sa.String(), nullable=True)) + + +def downgrade(): + op.drop_column('email', 'cc') + op.drop_column('email', 'bcc') + op.drop_column('email', 'timestamp') + op.drop_column('email', 'workflow_id')