authentik.policies.migrations.0012_alter_policybinding_managers_policybinding_expires_and_more
1# Generated by Django 5.2.15 on 2026-07-16 13:07 2 3import django.db.models.manager 4from django.conf import settings 5from django.db import migrations, models 6 7 8class Migration(migrations.Migration): 9 10 dependencies = [ 11 ("authentik_core", "0059_add_application_meta_hide"), 12 ("authentik_policies", "0011_policybinding_failure_result_and_more"), 13 migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 ] 15 16 operations = [ 17 migrations.AlterModelManagers( 18 name="policybinding", 19 managers=[], 20 ), 21 migrations.AddField( 22 model_name="policybinding", 23 name="expires", 24 field=models.DateTimeField(default=None, null=True), 25 ), 26 migrations.AddField( 27 model_name="policybinding", 28 name="expiring", 29 field=models.BooleanField(default=False), 30 ), 31 migrations.AddIndex( 32 model_name="policybinding", 33 index=models.Index(fields=["expires"], name="authentik_p_expires_a1009a_idx"), 34 ), 35 migrations.AddIndex( 36 model_name="policybinding", 37 index=models.Index(fields=["expiring"], name="authentik_p_expirin_df8da3_idx"), 38 ), 39 migrations.AddIndex( 40 model_name="policybinding", 41 index=models.Index( 42 fields=["expiring", "expires"], name="authentik_p_expirin_4adf3e_idx" 43 ), 44 ), 45 ]
class
Migration(django.db.migrations.migration.Migration):
9class Migration(migrations.Migration): 10 11 dependencies = [ 12 ("authentik_core", "0059_add_application_meta_hide"), 13 ("authentik_policies", "0011_policybinding_failure_result_and_more"), 14 migrations.swappable_dependency(settings.AUTH_USER_MODEL), 15 ] 16 17 operations = [ 18 migrations.AlterModelManagers( 19 name="policybinding", 20 managers=[], 21 ), 22 migrations.AddField( 23 model_name="policybinding", 24 name="expires", 25 field=models.DateTimeField(default=None, null=True), 26 ), 27 migrations.AddField( 28 model_name="policybinding", 29 name="expiring", 30 field=models.BooleanField(default=False), 31 ), 32 migrations.AddIndex( 33 model_name="policybinding", 34 index=models.Index(fields=["expires"], name="authentik_p_expires_a1009a_idx"), 35 ), 36 migrations.AddIndex( 37 model_name="policybinding", 38 index=models.Index(fields=["expiring"], name="authentik_p_expirin_df8da3_idx"), 39 ), 40 migrations.AddIndex( 41 model_name="policybinding", 42 index=models.Index( 43 fields=["expiring", "expires"], name="authentik_p_expirin_4adf3e_idx" 44 ), 45 ), 46 ]
The base class for all migrations.
Migration files will import this from django.db.migrations.Migration and subclass it as a class called Migration. It will have one or more of the following attributes:
- operations: A list of Operation instances, probably from django.db.migrations.operations
- dependencies: A list of tuples of (app_path, migration_name)
- run_before: A list of tuples of (app_path, migration_name)
- replaces: A list of migration_names
Note that all migrations come out of migrations and into the Loader or Graph as instances, having been initialized with their app label and name.
dependencies =
[('authentik_core', '0059_add_application_meta_hide'), ('authentik_policies', '0011_policybinding_failure_result_and_more'), ('authentik_core', '__first__')]
operations =
[<AlterModelManagers name='policybinding', managers=[]>, <AddField model_name='policybinding', name='expires', field=<django.db.models.fields.DateTimeField>>, <AddField model_name='policybinding', name='expiring', field=<django.db.models.fields.BooleanField>>, <AddIndex model_name='policybinding', index=<Index: fields=['expires'] name='authentik_p_expires_a1009a_idx'>>, <AddIndex model_name='policybinding', index=<Index: fields=['expiring'] name='authentik_p_expirin_df8da3_idx'>>, <AddIndex model_name='policybinding', index=<Index: fields=['expiring', 'expires'] name='authentik_p_expirin_4adf3e_idx'>>]