-
[django.db.migrations.operations.models.AddConstraint]
-
Add a field to a model.
[django.db.migrations.operations.fields.AddField]
-
Add an index on a model.
[django.db.migrations.operations.models.AddIndex]
-
Alter a field's database column (e.g. null, max_length) to the provided new field.
[django.db.migrations.operations.fields.AlterField]
-
Change the value of index_together to the target one. Input value of index_together must be a set of tuples.
[django.db.migrations.operations.models.AlterIndexTogether]
-
Alter the model's managers.
[django.db.migrations.operations.models.AlterModelManagers]
-
Set new model options that don't directly affect the database schema (like verbose_name, permissions, ordering). Python code in migrations may still need them.
[django.db.migrations.operations.models.AlterModelOptions]
-
Rename a model's table.
[django.db.migrations.operations.models.AlterModelTable]
-
Represent a change with the order_with_respect_to option.
[django.db.migrations.operations.models.AlterOrderWithRespectTo]
-
Change the value of unique_together to the target one. Input value of unique_together must be a set of tuples.
[django.db.migrations.operations.models.AlterUniqueTogether]
-
Create a model's table.
[django.db.migrations.operations.models.CreateModel]
-
Drop a model's table.
[django.db.migrations.operations.models.DeleteModel]
-
[django.db.migrations.operations.models.RemoveConstraint]
-
Remove a field from a model.
[django.db.migrations.operations.fields.RemoveField]
-
Remove an index from a model.
[django.db.migrations.operations.models.RemoveIndex]
-
Rename a field on the model. Might affect db_column too.
[django.db.migrations.operations.fields.RenameField]
-
Rename a model.
[django.db.migrations.operations.models.RenameModel]
-
Run Python code in a context suitable for doing versioned ORM operations.
[django.db.migrations.operations.special.RunPython]
-
Run some raw SQL. A reverse SQL statement may be provided.
[django.db.migrations.operations.special.RunSQL]
-
Take two lists of operations - ones that will be used for the database,
[django.db.migrations.operations.special.SeparateDatabaseAndState]