"""Add reservoir_registries table

Revision ID: 11ee5c074009
Revises: 4db74efaf82e
Create Date: 2025-08-26 03:31:43.771428

"""

import sqlalchemy as sa
from alembic import op

from ai.backend.manager.models.base import GUID

# revision identifiers, used by Alembic.
revision = "11ee5c074009"
down_revision = "4db74efaf82e"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "reservoir_registries",
        sa.Column("id", GUID(), server_default=sa.text("uuid_generate_v4()"), nullable=False),
        sa.Column("endpoint", sa.String(), nullable=False),
        sa.Column("access_key", sa.String(), nullable=False),
        sa.Column("secret_key", sa.String(), nullable=False),
        sa.Column("api_version", sa.String(), nullable=False),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_reservoir_registries")),
    )
    # ### end Alembic commands ###


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