django_evolution.mutations.move_to_django_migrations
Mutation that moves an app to Django migrations.
Added in version 2.2.
Classes
|
A mutation that uses Django migrations for an app's future upgrades. |
- class django_evolution.mutations.move_to_django_migrations.MoveToDjangoMigrations(mark_applied=['0001_initial'])
Bases:
BaseUpgradeMethodMutationA mutation that uses Django migrations for an app’s future upgrades.
This directs this app to evolve only up until this mutation, and to then hand any future schema changes over to Django’s migrations.
Once this mutation is used, no further mutations can be added for the app.
Changed in version 2.2: Moved into the
django_evolution.mutations.move_to_django_migrationsmodule.- __init__(mark_applied=['0001_initial'])
Initialize the mutation.
- Parameters:
mark_applied (
unicode, optional) – The list of migrations to mark as applied. Each of these should have been covered by the initial table or subsequent evolutions. By default, this covers the0001_initialmigration.
- generate_dependencies(app_label, **kwargs)
Return automatic dependencies for the parent evolution.
This will generate a dependency forcing this evolution to apply after or instead of the migrations that are marked as applied (depending on the database state), ensuring that subsequent migrations are applied in the correct order.
Added in version 2.4.2:
This now returns a
replace_migrationsdependency key.
Added in version 2.1.
- simulate(simulation)
Simulate the mutation.
This will alter the app’s signature to mark it as being handled by Django migrations.
- Parameters:
simulation (
Simulation) – The simulation being performed.
- __annotations__ = {}