42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
"""empty message
|
|
|
|
Revision ID: 5f06108116ae
|
|
Revises: 90dd63672e0a
|
|
Create Date: 2020-03-13 14:55:32.214380
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '5f06108116ae'
|
|
down_revision = '90dd63672e0a'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('workflow_spec_category',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('name', sa.String(), nullable=True),
|
|
sa.Column('display_name', sa.String(), nullable=True),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
op.add_column('file', sa.Column('is_status', sa.Boolean(), nullable=True))
|
|
op.add_column('workflow_spec', sa.Column('is_status', sa.Boolean(), nullable=True))
|
|
op.add_column('workflow_spec', sa.Column('workflow_spec_category_id', sa.Integer(), nullable=True))
|
|
op.create_foreign_key(None, 'workflow_spec', 'workflow_spec_category', ['workflow_spec_category_id'], ['id'])
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(None, 'workflow_spec', type_='foreignkey')
|
|
op.drop_column('workflow_spec', 'workflow_spec_category_id')
|
|
op.drop_column('workflow_spec', 'is_status')
|
|
op.drop_column('file', 'is_status')
|
|
op.drop_table('workflow_spec_category')
|
|
# ### end Alembic commands ###
|