"""add fine_tuned_models table

Revision ID: 810df6adb9db
Revises: eda751de4bed
Create Date: 2025-10-25 13:49:29.420697

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "810df6adb9db"
down_revision: Union[str, None] = "eda751de4bed"
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! ###
    op.create_table(
        "fine_tuned_models",
        sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
        sa.Column("name", sa.String(), nullable=False),
        sa.Column("adapter_path", sa.String(), nullable=True),
        sa.Column("date_added", sa.DateTime(), nullable=True),
        sa.Column("last_trained", sa.DateTime(), nullable=True),
        sa.Column("files_used", sa.JSON(), nullable=True),
        sa.Column("settings", sa.JSON(), nullable=True),
        sa.Column("tags", sa.JSON(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
        sa.UniqueConstraint("name"),
    )
    # ### end Alembic commands ###


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