"""rename mjk_release_packages to mjk_app_release_packages

Revision ID: 8d901bc90e67
Revises: 7149f61a2f9c
Create Date: 2026-05-26 10:05:16.921079

"""
from typing import Sequence, Union

from alembic import op


# revision identifiers, used by Alembic.
revision: str = '8d901bc90e67'
down_revision: Union[str, Sequence[str], None] = '7149f61a2f9c'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    op.execute("ALTER TABLE IF EXISTS mjk_release_packages RENAME TO mjk_app_release_packages")
    op.execute("ALTER INDEX IF EXISTS uix_pkg_platform_arch RENAME TO uix_app_pkg_platform_arch")


def downgrade() -> None:
    """Downgrade schema."""
    op.execute("ALTER INDEX IF EXISTS uix_app_pkg_platform_arch RENAME TO uix_pkg_platform_arch")
    op.execute("ALTER TABLE IF EXISTS mjk_app_release_packages RENAME TO mjk_release_packages")
