mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-23 21:28:32 +00:00
Add name
column to email
table
This commit is contained in:
parent
97323279cf
commit
56fe0bb606
@ -20,6 +20,7 @@ class EmailModel(db.Model):
|
|||||||
timestamp = db.Column(db.DateTime(timezone=True), default=func.now())
|
timestamp = db.Column(db.DateTime(timezone=True), default=func.now())
|
||||||
workflow_spec_id = db.Column(db.String, nullable=True)
|
workflow_spec_id = db.Column(db.String, nullable=True)
|
||||||
study = db.relationship(StudyModel)
|
study = db.relationship(StudyModel)
|
||||||
|
name = db.Column(db.String)
|
||||||
|
|
||||||
|
|
||||||
class EmailModelSchema(ma.Schema):
|
class EmailModelSchema(ma.Schema):
|
||||||
|
24
migrations/versions/cedd03c24166_email_name_column.py
Normal file
24
migrations/versions/cedd03c24166_email_name_column.py
Normal 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')
|
Loading…
x
Reference in New Issue
Block a user