diff --git a/authentik/core/migrations/0038_source_authentik_c_enabled_d72365_idx.py b/authentik/core/migrations/0038_source_authentik_c_enabled_d72365_idx.py new file mode 100644 index 0000000000..ba72ffdee6 --- /dev/null +++ b/authentik/core/migrations/0038_source_authentik_c_enabled_d72365_idx.py @@ -0,0 +1,19 @@ +# Generated by Django 5.0.7 on 2024-07-22 13:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_core", "0037_remove_source_property_mappings"), + ("authentik_flows", "0027_auto_20231028_1424"), + ("authentik_policies", "0011_policybinding_failure_result_and_more"), + ] + + operations = [ + migrations.AddIndex( + model_name="source", + index=models.Index(fields=["enabled"], name="authentik_c_enabled_d72365_idx"), + ), + ] diff --git a/authentik/core/models.py b/authentik/core/models.py index d0a70d6bbf..908bb614b6 100644 --- a/authentik/core/models.py +++ b/authentik/core/models.py @@ -683,6 +683,11 @@ class Source(ManagedModel, SerializerModel, PolicyBindingModel): "name", ] ), + models.Index( + fields=[ + "enabled", + ] + ), ]