-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server/oauth2: fix OAuth2Grant/OAuth2Token client_id length
- Loading branch information
1 parent
dfb2f14
commit 886e814
Showing
4 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
server/migrations/versions/2025-01-02-1558_raise_oauth2grant_oauth2token_client_id_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
"""Raise OAuth2Grant/OAuth2Token.client_id length limit | ||
Revision ID: 6a6e872cbea5 | ||
Revises: 7cb32fb2fc26 | ||
Create Date: 2025-01-02 15:58:59.376742 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# Polar Custom Imports | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "6a6e872cbea5" | ||
down_revision = "7cb32fb2fc26" | ||
branch_labels: tuple[str] | None = None | ||
depends_on: tuple[str] | None = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"oauth2_grants", | ||
"client_id", | ||
existing_type=sa.VARCHAR(length=48), | ||
type_=sa.String(length=52), | ||
existing_nullable=False, | ||
) | ||
op.alter_column( | ||
"oauth2_tokens", | ||
"client_id", | ||
existing_type=sa.VARCHAR(length=48), | ||
type_=sa.String(length=52), | ||
nullable=False, | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"oauth2_tokens", | ||
"client_id", | ||
existing_type=sa.String(length=52), | ||
type_=sa.VARCHAR(length=48), | ||
nullable=True, | ||
) | ||
op.alter_column( | ||
"oauth2_grants", | ||
"client_id", | ||
existing_type=sa.String(length=52), | ||
type_=sa.VARCHAR(length=48), | ||
existing_nullable=False, | ||
) | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters