2019-12-27 18:51:33 +00:00
|
|
|
"""empty message
|
|
|
|
|
2020-01-02 15:14:48 +00:00
|
|
|
Revision ID: 9d233e1c58b1
|
2019-12-27 18:51:33 +00:00
|
|
|
Revises: 53596ce86e7e
|
2020-01-02 15:14:48 +00:00
|
|
|
Create Date: 2020-01-02 10:13:24.486261
|
2019-12-27 18:51:33 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
2020-01-02 15:14:48 +00:00
|
|
|
revision = '9d233e1c58b1'
|
2019-12-27 18:51:33 +00:00
|
|
|
down_revision = '53596ce86e7e'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.create_table('file',
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('name', sa.String(), nullable=True),
|
|
|
|
sa.Column('version', sa.Integer(), nullable=True),
|
|
|
|
sa.Column('last_updated', sa.DateTime(timezone=True), nullable=True),
|
|
|
|
sa.Column('type', sa.Enum('bpmn', 'svg', 'dmn', name='filetype'), nullable=True),
|
|
|
|
sa.Column('primary', sa.Boolean(), nullable=True),
|
|
|
|
sa.Column('content_type', sa.String(), nullable=True),
|
|
|
|
sa.Column('workflow_spec_id', sa.Integer(), nullable=True),
|
|
|
|
sa.ForeignKeyConstraint(['workflow_spec_id'], ['workflow_spec.id'], ),
|
|
|
|
sa.PrimaryKeyConstraint('id')
|
|
|
|
)
|
|
|
|
op.create_table('file_data',
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('data', sa.LargeBinary(), nullable=True),
|
2020-01-02 15:14:48 +00:00
|
|
|
sa.Column('file_model_id', sa.Integer(), nullable=True),
|
|
|
|
sa.ForeignKeyConstraint(['file_model_id'], ['file.id'], ),
|
2019-12-27 18:51:33 +00:00
|
|
|
sa.PrimaryKeyConstraint('id')
|
|
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_table('file_data')
|
|
|
|
op.drop_table('file')
|
|
|
|
# ### end Alembic commands ###
|