-
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server/oauth2: raise OAuth2Client.client_id/client_secret length limits
- Loading branch information
1 parent
1af02e2
commit cc6bbdb
Showing
4 changed files
with
65 additions
and
13 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
server/migrations/versions/2025-01-02-1436_raise_oauth2client_client_id_client_.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 OAuth2Client.client_id/client_secret length limits | ||
Revision ID: d23cb1d45208 | ||
Revises: eaf307b21bd9 | ||
Create Date: 2025-01-02 14:36:38.357087 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# Polar Custom Imports | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "d23cb1d45208" | ||
down_revision = "eaf307b21bd9" | ||
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_clients", | ||
"client_id", | ||
existing_type=sa.VARCHAR(length=48), | ||
type_=sa.String(length=52), | ||
nullable=False, | ||
) | ||
op.alter_column( | ||
"oauth2_clients", | ||
"client_secret", | ||
existing_type=sa.VARCHAR(length=120), | ||
type_=sa.String(length=52), | ||
nullable=False, | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"oauth2_clients", | ||
"client_secret", | ||
existing_type=sa.String(length=52), | ||
type_=sa.VARCHAR(length=120), | ||
nullable=True, | ||
) | ||
op.alter_column( | ||
"oauth2_clients", | ||
"client_id", | ||
existing_type=sa.String(length=52), | ||
type_=sa.VARCHAR(length=48), | ||
nullable=True, | ||
) | ||
# ### 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