"""v0.14.0.

Revision ID: 70a6ecb1f00a
Revises: 662ce3243364
Create Date: 2023-09-30 17:27:21.635089

"""
import sqlalchemy as sa  # noqa
import sqlmodel  # noqa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "70a6ecb1f00a"
down_revision = "662ce3243364"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "cloud_run_instance",
        "lamin_instance_id",
        existing_type=postgresql.UUID(),
        nullable=False,
    )
    op.alter_column(
        "cloud_run_instance",
        "cloud_run_instance_name",
        existing_type=sa.VARCHAR(),
        nullable=True,
    )
    op.alter_column(
        "cloud_run_instance", "api_url", existing_type=sa.VARCHAR(), nullable=True
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "cloud_run_instance", "api_url", existing_type=sa.VARCHAR(), nullable=False
    )
    op.alter_column(
        "cloud_run_instance",
        "cloud_run_instance_name",
        existing_type=sa.VARCHAR(),
        nullable=False,
    )
    op.alter_column(
        "cloud_run_instance",
        "lamin_instance_id",
        existing_type=postgresql.UUID(),
        nullable=True,
    )
    # ### end Alembic commands ###
