"""add relationship between restaurants and couriers

Revision ID: f03e66c6c95a
Revises: <KEY>
Create Date: 2021-03-24 14:26:02.965519

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('restaurant_couriers',
    sa.Column('restaurant_id', sa.Integer(), nullable=False),
    sa.Column('courier_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['courier_id'], ['courier.id'], ),
    sa.ForeignKeyConstraint(['restaurant_id'], ['restaurant.id'], ),
    sa.PrimaryKeyConstraint('restaurant_id', 'courier_id')
    )
    # ### end Alembic commands ###


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

"""add relationship between restaurants and couriers

Revision ID: f03e66c6c95a
Revises: <KEY>
Create Date: 2021-03-24 14:26:02.965519

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('restaurant_couriers',
    sa.Column('restaurant_id', sa.Integer(), nullable=False),
    sa.Column('courier_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['courier_id'], ['courier.id'], ),
    sa.ForeignKeyConstraint(['restaurant_id'], ['restaurant.id'], ),
    sa.PrimaryKeyConstraint('restaurant_id', 'courier_id')
    )
    # ### end Alembic commands ###


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

add relationship between restaurants and couriers  Revision ID: f03e66c6c95a Revises: <KEY> Create Date: 2021-03-24 14:26:02.965519 # 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 ###