"""rename_relationship_to_relation_type

Revision ID: 2a4784830015
Revises: 2ede6d343f7c
Create Date: 2025-09-25 15:20:07.573393

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2a4784830015'
down_revision = '2ede6d343f7c'
branch_labels = None
depends_on = None


def upgrade() -> None:
    # Переименовываем столбец relationship в relation_type
    op.alter_column('emergency_contacts', 'relationship', new_column_name='relation_type')


def downgrade() -> None:
    # Возвращаем исходное название
    op.alter_column('emergency_contacts', 'relation_type', new_column_name='relationship')