"""blender render settings

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

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

revision: str = "003"
down_revision: Union[str, None] = "002"
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 "
        "('blender_engine', 'cycles', NOW()),"
        "('blender_cycles_samples', '256', NOW()),"
        "('blender_eevee_samples', '64', NOW()) "
        "ON CONFLICT (key) DO NOTHING"
    )


def downgrade() -> None:
    op.execute(
        "DELETE FROM system_settings WHERE key IN "
        "('blender_engine', 'blender_cycles_samples', 'blender_eevee_samples')"
    )
