"""Added groups_missions table

Revision ID: 2b1863a985a6
Revises: eaf2af6f6b22
Create Date: 2025-11-09 18:33:51.885010

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2b1863a985a6'
down_revision = 'eaf2af6f6b22'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('groups_missions',
    sa.Column('mission_name', sa.String(length=255), nullable=False),
    sa.Column('group_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['group_id'], ['groups.id'], ),
    sa.ForeignKeyConstraint(['mission_name'], ['missions.name'], ),
    sa.PrimaryKeyConstraint('mission_name', 'group_id')
    )

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###

    op.drop_table('groups_missions')
    # ### end Alembic commands ###
