"""add_service_settings_fields

Revision ID: 9623fe2fc53a
Revises: 310819639420
Create Date: 2025-10-28 12:20:40.496296

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from airunner.utils.db import add_column
from airunner.components.settings.data.application_settings import (
    ApplicationSettings,
)


# revision identifiers, used by Alembic.
revision: str = "9623fe2fc53a"
down_revision: Union[str, None] = "310819639420"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    add_column(ApplicationSettings, "run_in_background")
    add_column(ApplicationSettings, "start_at_login")
    add_column(ApplicationSettings, "http_server_enabled")
    add_column(ApplicationSettings, "http_server_host")
    add_column(ApplicationSettings, "http_server_port")
    add_column(ApplicationSettings, "lna_enabled")
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("application_settings", "lna_enabled")
    op.drop_column("application_settings", "http_server_port")
    op.drop_column("application_settings", "http_server_host")
    op.drop_column("application_settings", "http_server_enabled")
    op.drop_column("application_settings", "start_at_login")
    op.drop_column("application_settings", "run_in_background")
    # ### end Alembic commands ###
