Add name column to email table

This commit is contained in:
mike cullerton 2022-04-25 15:36:47 -04:00
parent 97323279cf
commit 56fe0bb606
2 changed files with 25 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class EmailModel(db.Model):
timestamp = db.Column(db.DateTime(timezone=True), default=func.now())
workflow_spec_id = db.Column(db.String, nullable=True)
study = db.relationship(StudyModel)
name = db.Column(db.String)
class EmailModelSchema(ma.Schema):

View File

@ -0,0 +1,24 @@
"""email-name-column
Revision ID: cedd03c24166
Revises: 3489d5a6a2c0
Create Date: 2022-04-25 15:09:05.597408
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'cedd03c24166'
down_revision = '3489d5a6a2c0'
branch_labels = None
depends_on = None
def upgrade():
op.add_column('email', sa.Column('name', sa.String(), nullable=True))
def downgrade():
op.drop_column('email', 'name')