Skip to content

Commit

Permalink
Merge pull request #16818 from davelopez/23.1_increase_external_user_…
Browse files Browse the repository at this point in the history
…id_db_size

[23.1] Increase `CustosAuthnzToken.external_user_id` column size
  • Loading branch information
jdavcs authored Oct 11, 2023
2 parents fba2605 + 9735633 commit 4f4526d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9534,7 +9534,7 @@ class CustosAuthnzToken(Base, RepresentById):

id = Column(Integer, primary_key=True)
user_id = Column(Integer, ForeignKey("galaxy_user.id"))
external_user_id = Column(String(64))
external_user_id = Column(String(255))
provider = Column(String(255))
access_token = Column(Text)
id_token = Column(Text)
Expand Down
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
4 changes: 2 additions & 2 deletions lib/galaxy/model/migrations/dbscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"22.05": "186d4835587b",
"release_23.0": "caa7742f7bca",
"23.0": "caa7742f7bca",
"release_23.1": "e0561d5fc8c7",
"23.1": "e0561d5fc8c7",
"release_23.1": "e93c5d0b47a9",
"23.1": "e93c5d0b47a9",
}


Expand Down

0 comments on commit 4f4526d

Please sign in to comment.