"""settings: app_setting(key/value 런타임 오버레이) 테이블

Revision ID: p16d4e5f6a7b8
Revises: p15c3d4e5f6a7
Create Date: 2026-06-15 09:00:00.000000

"""

from typing import Sequence, Union

import sqlalchemy as sa
import sqlmodel
from alembic import op

revision: str = "p16d4e5f6a7b8"
down_revision: Union[str, Sequence[str], None] = "p15c3d4e5f6a7"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

S = sqlmodel.sql.sqltypes.AutoString


def upgrade() -> None:
    op.create_table(
        "app_setting",
        sa.Column("key", S(), nullable=False),
        sa.Column("value", S(), nullable=False),
        sa.Column("updated_at", sa.DateTime(), nullable=False),
        sa.PrimaryKeyConstraint("key"),
    )


def downgrade() -> None:
    op.drop_table("app_setting")
