spiff-arena/spiffworkflow-backend/migrations/versions/55bbdeb6b635_.py

43 lines
1.3 KiB
Python

"""empty message
Revision ID: 55bbdeb6b635
Revises: 844cee572018
Create Date: 2023-09-11 10:30:38.559968
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '55bbdeb6b635'
down_revision = '844cee572018'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('json_data_store',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=255), nullable=True),
sa.Column('location', sa.String(length=255), nullable=True),
sa.Column('data', sa.JSON(), nullable=True),
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
with op.batch_alter_table('json_data_store', schema=None) as batch_op:
batch_op.create_index(batch_op.f('ix_json_data_store_name'), ['name'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('json_data_store', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_json_data_store_name'))
op.drop_table('json_data_store')
# ### end Alembic commands ###