Files
oicd/migrations/versions/keettxs5w17k_add_client_id_to_access_tokens.py
2025-11-30 00:07:24 +01:00

29 lines
791 B
Python

"""Add client_id to access_tokens table
Revision ID: keettxs5w17k
Revises: d0b3ddd682f3
Create Date: 2025-11-28 12:00:00.000000
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'keettxs5w17k'
down_revision = 'd0b3ddd682f3'
branch_labels = None
depends_on = None
def upgrade():
# Add client_id column to access_tokens table
op.add_column('access_tokens', sa.Column('client_id', sa.String(length=128), nullable=True))
op.create_index(op.f('ix_access_tokens_client_id'), 'access_tokens', ['client_id'], unique=False)
def downgrade():
# Remove client_id column from access_tokens table
op.drop_index(op.f('ix_access_tokens_client_id'), table_name='access_tokens')
op.drop_column('access_tokens', 'client_id')