"""rename_tessellation_settings_gltf_production_to_scene

Revision ID: 6ebfe2737531
Revises: 062
Create Date: 2026-03-12 20:39:36.880236

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '6ebfe2737531'
down_revision: Union[str, None] = '062'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.execute("""
        UPDATE system_settings
        SET key = 'scene_linear_deflection'
        WHERE key = 'gltf_production_linear_deflection'
    """)
    op.execute("""
        UPDATE system_settings
        SET key = 'scene_angular_deflection'
        WHERE key = 'gltf_production_angular_deflection'
    """)


def downgrade() -> None:
    op.execute("""
        UPDATE system_settings
        SET key = 'gltf_production_linear_deflection'
        WHERE key = 'scene_linear_deflection'
    """)
    op.execute("""
        UPDATE system_settings
        SET key = 'gltf_production_angular_deflection'
        WHERE key = 'scene_angular_deflection'
    """)
