<reponame>nikaera/fastapi-sqlalchemy-alembic-pytest-sample
"""Add GroupItem model

Revision ID: 9e522139d191
Revises: ca3dfe288701
Create Date: 2021-06-25 15:42:25.136267

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy_utils import UUIDType

# revision identifiers, used by Alembic.
revision = '9e522139d191'
down_revision = 'ca3dfe288701'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('group_items',
    sa.Column('id', UUIDType(binary=False), nullable=False),
    sa.Column('group_id', UUIDType(binary=False), nullable=False),
    sa.Column('item_id', UUIDType(binary=False), nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
    sa.Column('updated_at', sa.DateTime(), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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