<reponame>bcgov/foi-flow<gh_stars>0
"""empty message

Revision ID: 5c10c2b1b92a
Revises: <KEY>
Create Date: 2021-10-25 09:33:08.184924

"""
from alembic import op
import sqlalchemy as sa
from datetime import datetime


# revision identifiers, used by Alembic.
revision = '5c10c2b1b92a'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    closereason_stage_table = op.create_table('CloseReasons',
    sa.Column('closereasonid', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('name', sa.String(length=500), nullable=False),
    sa.Column('isactive', sa.Boolean(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True, default=datetime.now()),
    sa.Column('createdby', sa.String(length=120), nullable=True, default ='System'),
    sa.PrimaryKeyConstraint('closereasonid')
    )
    op.bulk_insert(
        closereason_stage_table,
        [
            {'name':'Abandoned','isactive':True},
            {'name':'Access Denied','isactive':True},
            {'name':'Application Fee - Abandoned','isactive':True},
            {'name':'Full Disclosure','isactive':True},
            {'name':'No Resp. Records Exist/Located','isactive':True},
            {'name':'Outdated Scope of Act','isactive':True},
            {'name':'Partial Disclosure','isactive':True},
            {'name':'Records in another Min/Org','isactive':True},
            {'name':'Refuse to Confirm or Deny','isactive':True},
            {'name':'Routinely Releasable','isactive':True},
            {'name':'Section 43','isactive':True},
            {'name':'Transferred','isactive':True},
            {'name':'Withdrawn','isactive':True},
           
        ]
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('CloseReasons')
    # ### end Alembic commands ###

"""empty message

Revision ID: 5c10c2b1b92a
Revises: <KEY>
Create Date: 2021-10-25 09:33:08.184924

"""
from alembic import op
import sqlalchemy as sa
from datetime import datetime


# revision identifiers, used by Alembic.
revision = '5c10c2b1b92a'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    closereason_stage_table = op.create_table('CloseReasons',
    sa.Column('closereasonid', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('name', sa.String(length=500), nullable=False),
    sa.Column('isactive', sa.Boolean(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True, default=datetime.now()),
    sa.Column('createdby', sa.String(length=120), nullable=True, default ='System'),
    sa.PrimaryKeyConstraint('closereasonid')
    )
    op.bulk_insert(
        closereason_stage_table,
        [
            {'name':'Abandoned','isactive':True},
            {'name':'Access Denied','isactive':True},
            {'name':'Application Fee - Abandoned','isactive':True},
            {'name':'Full Disclosure','isactive':True},
            {'name':'No Resp. Records Exist/Located','isactive':True},
            {'name':'Outdated Scope of Act','isactive':True},
            {'name':'Partial Disclosure','isactive':True},
            {'name':'Records in another Min/Org','isactive':True},
            {'name':'Refuse to Confirm or Deny','isactive':True},
            {'name':'Routinely Releasable','isactive':True},
            {'name':'Section 43','isactive':True},
            {'name':'Transferred','isactive':True},
            {'name':'Withdrawn','isactive':True},
           
        ]
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('CloseReasons')
    # ### end Alembic commands ###
empty message  Revision ID: 5c10c2b1b92a Revises: <KEY> Create Date: 2021-10-25 09:33:08.184924 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###