authentik.tasks.migrations.0009_remove_task_tenant
1from django.db import migrations 2 3 4class Migration(migrations.Migration): 5 6 dependencies = [ 7 ("authentik_tasks", "0008_remove_task_update_aggregated_status_and_more"), 8 ] 9 10 operations = [ 11 migrations.SeparateDatabaseAndState( 12 state_operations=[ 13 migrations.RemoveField( 14 model_name="task", 15 name="tenant", 16 ), 17 ], 18 database_operations=[ 19 migrations.RunSQL( 20 sql='ALTER TABLE "authentik_tasks_task" ALTER COLUMN "tenant_id" DROP NOT NULL', 21 reverse_sql=migrations.RunSQL.noop, 22 ), 23 ], 24 ), 25 ]
class
Migration(django.db.migrations.migration.Migration):
5class Migration(migrations.Migration): 6 7 dependencies = [ 8 ("authentik_tasks", "0008_remove_task_update_aggregated_status_and_more"), 9 ] 10 11 operations = [ 12 migrations.SeparateDatabaseAndState( 13 state_operations=[ 14 migrations.RemoveField( 15 model_name="task", 16 name="tenant", 17 ), 18 ], 19 database_operations=[ 20 migrations.RunSQL( 21 sql='ALTER TABLE "authentik_tasks_task" ALTER COLUMN "tenant_id" DROP NOT NULL', 22 reverse_sql=migrations.RunSQL.noop, 23 ), 24 ], 25 ), 26 ]
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.