Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 1 addition & 38 deletions alembic/versions/b2c6d1170383_add_client_id_to_tooldbmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import sqlalchemy as sa
import sqlmodel
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision: str = "b2c6d1170383"
Expand All @@ -22,45 +21,9 @@

def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"finegrainedauthorisationdbmodel",
"role",
existing_type=postgresql.ENUM(
"CONTRIBUTOR", "EDITOR", "PROVIDER_ADMIN", "ADMIN", "CONTRIBUTOR_PENDING", name="role"
),
type_=sa.Enum(
"CONTRIBUTOR",
"EDITOR",
"PROVIDER_ADMIN",
"ADMIN",
"SUPER_ADMIN",
"CONTRIBUTOR_PENDING",
name="finegrainedauthorisationrole",
),
existing_nullable=False,
)
op.add_column("tooldbmodel", sa.Column("client_id", sqlmodel.sql.sqltypes.AutoString(), nullable=False))
# ### end Alembic commands ###
op.add_column("tooldbmodel", sa.Column("client_id", sqlmodel.sql.sqltypes.AutoString(), nullable=True))


def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("tooldbmodel", "client_id")
op.alter_column(
"finegrainedauthorisationdbmodel",
"role",
existing_type=sa.Enum(
"CONTRIBUTOR",
"EDITOR",
"PROVIDER_ADMIN",
"ADMIN",
"SUPER_ADMIN",
"CONTRIBUTOR_PENDING",
name="finegrainedauthorisationrole",
),
type_=postgresql.ENUM("CONTRIBUTOR", "EDITOR", "PROVIDER_ADMIN", "ADMIN", "CONTRIBUTOR_PENDING", name="role"),
existing_nullable=False,
)
# ### end Alembic commands ###
Loading