From c11bf3d286beb7d0566656f63e3ed64822ee81a2 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Tue, 21 Jan 2020 15:22:44 -0500 Subject: [PATCH] Adds workflow spec name field --- crc/models/workflow.py | 1 + migrations/versions/e9092efd6f26_.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 migrations/versions/e9092efd6f26_.py diff --git a/crc/models/workflow.py b/crc/models/workflow.py index 4da95153..d004c30e 100644 --- a/crc/models/workflow.py +++ b/crc/models/workflow.py @@ -10,6 +10,7 @@ from crc import db, ma class WorkflowSpecModel(db.Model): __tablename__ = 'workflow_spec' id = db.Column(db.String, primary_key=True) + name = db.Column(db.String) display_name = db.Column(db.String) description = db.Column(db.Text) diff --git a/migrations/versions/e9092efd6f26_.py b/migrations/versions/e9092efd6f26_.py new file mode 100644 index 00000000..c7e7ac2e --- /dev/null +++ b/migrations/versions/e9092efd6f26_.py @@ -0,0 +1,28 @@ +"""empty message + +Revision ID: e9092efd6f26 +Revises: 9d233e1c58b1 +Create Date: 2020-01-21 11:53:52.597318 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'e9092efd6f26' +down_revision = '9d233e1c58b1' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('workflow_spec', sa.Column('name', sa.String(), nullable=True)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('workflow_spec', 'name') + # ### end Alembic commands ###