-
-
Notifications
You must be signed in to change notification settings - Fork 945
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
providers/oauth2: fix size limited index for tokens (#11879)
* providers/oauth2: fix size limited index for tokens I preserved the migrations as comments so the index IDs and migration IDs remain searchable without accessing git history. * rename migration file to more descriptive
- Loading branch information
1 parent
8ad0f63
commit 77fff58
Showing
4 changed files
with
68 additions
and
30 deletions.
There are no files selected for viewing
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
31 changes: 31 additions & 0 deletions
31
authentik/providers/oauth2/migrations/0023_alter_accesstoken_refreshtoken_use_hash_index.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,31 @@ | ||
# Generated by Django 5.0.9 on 2024-10-31 14:28 | ||
|
||
import django.contrib.postgres.indexes | ||
from django.conf import settings | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("authentik_core", "0040_provider_invalidation_flow"), | ||
("authentik_providers_oauth2", "0022_remove_accesstoken_session_id_and_more"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL("DROP INDEX IF EXISTS authentik_p_token_f99422_idx;"), | ||
migrations.RunSQL("DROP INDEX IF EXISTS authentik_p_token_a1d921_idx;"), | ||
migrations.AddIndex( | ||
model_name="accesstoken", | ||
index=django.contrib.postgres.indexes.HashIndex( | ||
fields=["token"], name="authentik_p_token_e00883_hash" | ||
), | ||
), | ||
migrations.AddIndex( | ||
model_name="refreshtoken", | ||
index=django.contrib.postgres.indexes.HashIndex( | ||
fields=["token"], name="authentik_p_token_32e2b7_hash" | ||
), | ||
), | ||
] |
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