Skip to content

Commit

Permalink
Add DB migration to increase external_user_id length
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Oct 10, 2023
1 parent af7d63b commit 239fd39
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""alter column CustosAuthnzToken.external_user_id to increase length
Revision ID: e93c5d0b47a9
Revises: e0561d5fc8c7
Create Date: 2023-10-08 12:11:02.024669
"""
import sqlalchemy as sa

from galaxy.model.migrations.util import alter_column

# revision identifiers, used by Alembic.
revision = "e93c5d0b47a9"
down_revision = "e0561d5fc8c7"
branch_labels = None
depends_on = None

table_name = "custos_authnz_token"
column_name = "external_user_id"

LONGER_LENGTH = 255


def upgrade():
alter_column(table_name, column_name, type_=sa.String(LONGER_LENGTH))


def downgrade():
# No need to downgrade, this is a one-way migration. Otherwise, existing data would be truncated or lost.
pass

0 comments on commit 239fd39

Please sign in to comment.