"""remove_session_resource_opts

Revision ID: d6a02307a057
Revises: fdc9d6ac49b4
Create Date: 2023-05-17 15:19:16.436304

"""

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

# revision identifiers, used by Alembic.
revision = "d6a02307a057"
down_revision = "fdc9d6ac49b4"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("sessions", "resource_opts")
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "sessions",
        sa.Column(
            "resource_opts",
            postgresql.JSONB(astext_type=sa.Text()),
            autoincrement=False,
            nullable=True,
        ),
    )
    # ### end Alembic commands ###
