spiff-arena/spiffworkflow-backend/migrations/versions/63fc8d693b9f_.py

35 lines
1.3 KiB
Python

"""empty message
Revision ID: 63fc8d693b9f
Revises: e05ca5cdc312
Create Date: 2023-02-09 11:54:34.935801
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '63fc8d693b9f'
down_revision = 'e05ca5cdc312'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('spiff_step_details', sa.Column('start_in_seconds', sa.DECIMAL(precision=17, scale=6), nullable=False))
op.add_column('spiff_step_details', sa.Column('end_in_seconds', sa.DECIMAL(precision=17, scale=6), nullable=True))
op.drop_column('spiff_step_details', 'engine_step_end_in_seconds')
op.drop_column('spiff_step_details', 'engine_step_start_in_seconds')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('spiff_step_details', sa.Column('engine_step_start_in_seconds', mysql.DECIMAL(precision=17, scale=6), nullable=True))
op.add_column('spiff_step_details', sa.Column('engine_step_end_in_seconds', mysql.DECIMAL(precision=17, scale=6), nullable=True))
op.drop_column('spiff_step_details', 'end_in_seconds')
op.drop_column('spiff_step_details', 'start_in_seconds')
# ### end Alembic commands ###