"""Added type field to MissionInvitation

Revision ID: f2adbb61ff2f
Revises: 35a075531973
Create Date: 2026-01-23 11:40:37.784648

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "f2adbb61ff2f"
down_revision = "35a075531973"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("mission_invitations", schema=None) as batch_op:
        batch_op.add_column(sa.Column("type", sa.String(length=255), nullable=True))
        batch_op.drop_constraint(batch_op.f("euds"), type_="foreignkey")

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("mission_invitations", schema=None) as batch_op:
        batch_op.create_foreign_key(batch_op.f("euds"), "euds", ["client_uid"], ["uid"])
        batch_op.drop_column("type")

    # ### end Alembic commands ###
