"""Drop  table

Revision ID: 49d0856e9569
Revises: 45fbb391d7af
Create Date: 2025-11-11 16:39:41.497832

"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "49d0856e9569"
down_revision = "45fbb391d7af"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("user_settings")
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "user_settings",
        sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
        sa.Column(
            "slurm_accounts",
            postgresql.JSONB(astext_type=sa.Text()),
            server_default=sa.text("'[]'::json"),
            autoincrement=False,
            nullable=False,
        ),
        sa.Column("ssh_host", sa.VARCHAR(), autoincrement=False, nullable=True),
        sa.Column(
            "ssh_username", sa.VARCHAR(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "ssh_private_key_path",
            sa.VARCHAR(),
            autoincrement=False,
            nullable=True,
        ),
        sa.Column(
            "ssh_tasks_dir", sa.VARCHAR(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "ssh_jobs_dir", sa.VARCHAR(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "slurm_user", sa.VARCHAR(), autoincrement=False, nullable=True
        ),
        sa.Column(
            "project_dir", sa.VARCHAR(), autoincrement=False, nullable=True
        ),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_user_settings")),
    )
    # ### end Alembic commands ###
