<reponame>bitbyt3r/2ber
"""Adding hotel block to requests

Revision ID: <KEY>
Revises: 1708acb6e515
Create Date: 2021-11-15 20:42:51.723559

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('hotel_room_request', schema=None) as batch_op:
        batch_op.add_column(sa.Column('hotel_block', sa.Integer(), nullable=True))
        batch_op.create_foreign_key(None, 'hotel_room_block', ['hotel_block'], ['id'])

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('hotel_room_request', schema=None) as batch_op:
        batch_op.drop_constraint(None, type_='foreignkey')
        batch_op.drop_column('hotel_block')

    # ### end Alembic commands ###

"""Adding hotel block to requests

Revision ID: <KEY>
Revises: 1708acb6e515
Create Date: 2021-11-15 20:42:51.723559

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('hotel_room_request', schema=None) as batch_op:
        batch_op.add_column(sa.Column('hotel_block', sa.Integer(), nullable=True))
        batch_op.create_foreign_key(None, 'hotel_room_block', ['hotel_block'], ['id'])

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('hotel_room_request', schema=None) as batch_op:
        batch_op.drop_constraint(None, type_='foreignkey')
        batch_op.drop_column('hotel_block')

    # ### end Alembic commands ###
Adding hotel block to requests  Revision ID: <KEY> Revises: 1708acb6e515 Create Date: 2021-11-15 20:42:51.723559 # 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 ###