Change column in email table from workflow_id to workflow_spec_id
This commit is contained in:
parent
b0a6af8d5e
commit
699fc7daac
|
@ -18,7 +18,7 @@ class EmailModel(db.Model):
|
|||
content_html = db.Column(db.String)
|
||||
study_id = db.Column(db.Integer, db.ForeignKey(StudyModel.id), nullable=True)
|
||||
timestamp = db.Column(db.DateTime(timezone=True), default=func.now())
|
||||
workflow_id = db.Column(db.String, nullable=True)
|
||||
workflow_spec_id = db.Column(db.String, nullable=True)
|
||||
study = db.relationship(StudyModel)
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
"""email table changes
|
||||
|
||||
Revision ID: 6d8ceb1c18cb
|
||||
Revises: 25f846183f1c
|
||||
Create Date: 2021-10-12 12:54:08.354995
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '6d8ceb1c18cb'
|
||||
down_revision = '25f846183f1c'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.drop_column('email', 'workflow_id')
|
||||
op.add_column('email', sa.Column('workflow_spec_id', sa.String()))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('email', 'workflow_spec_id')
|
||||
op.add_column('email', sa.Column('workflow_id', sa.String()))
|
Loading…
Reference in New Issue