"""change in locale

Revision ID: 50962aee4828
Revises: 27578d637b15
Create Date: 2025-08-19 13:25:02.713738

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '50962aee4828'
down_revision: Union[str, None] = '27578d637b15'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('locales', sa.Column('location_id', sa.Integer(), nullable=True))
    op.create_foreign_key('locales_location_id_fkey', 'locales', 'locations', ['location_id'], ['id'])
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('locales_location_id_fkey', 'locales', type_='foreignkey')
    op.drop_column('locales', 'location_id')
    # ### end Alembic commands ###
