"""threejs render size setting

Revision ID: 004
Revises: 003
Create Date: 2026-03-01

"""
from typing import Sequence, Union
from alembic import op

revision: str = "004"
down_revision: Union[str, None] = "003"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.execute(
        "INSERT INTO system_settings (key, value, updated_at) VALUES "
        "('threejs_render_size', '512', NOW()) "
        "ON CONFLICT (key) DO NOTHING"
    )


def downgrade() -> None:
    op.execute(
        "DELETE FROM system_settings WHERE key = 'threejs_render_size'"
    )
