update token_type to string instead of enum (#3087)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
"""add 1password service account token type
|
||||
|
||||
Revision ID: 2e58ef1b3d8b
|
||||
Revises: 1b2a8b62de61
|
||||
Create Date: 2025-08-01 16:31:37.315522+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "2e58ef1b3d8b"
|
||||
down_revision: Union[str, None] = "1b2a8b62de61"
|
||||
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.alter_column(
|
||||
"organization_auth_tokens",
|
||||
"token_type",
|
||||
existing_type=postgresql.ENUM("api", name="organizationauthtokentype"),
|
||||
type_=sa.String(),
|
||||
existing_nullable=False,
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column(
|
||||
"organization_auth_tokens",
|
||||
"token_type",
|
||||
existing_type=sa.String(),
|
||||
type_=postgresql.ENUM("api", name="organizationauthtokentype"),
|
||||
existing_nullable=False,
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user