django_evolution.mutations.delete_application
Mutation that deletes an application.
New in version 2.2.
Classes
A mutation that deletes an application. |
- class django_evolution.mutations.delete_application.DeleteApplication
Bases:
BaseMutation
A mutation that deletes an application.
Changed in version 2.2: Moved into the
django_evolution.mutations.delete_application
module.- simulation_failure_error = 'Cannot delete the application "%(app_label)s".'
- simulate(simulation)
Simulate the mutation.
This will alter the database schema to delete the specified application.
- Parameters:
simulation (
Simulation
) – The state for the simulation.- Raises:
django_evolution.errors.SimulationFailure – The simulation failed. The reason is in the exception’s message.
- mutate(mutator)
Schedule an application deletion on the mutator.
This will instruct the mutator to delete an application, if it exists. It will be scheduled and later executed on the database, if not optimized out.
- Parameters:
mutator (
django_evolution.mutators.AppMutator
) – The mutator to perform an operation on.
- is_mutable(*args, **kwargs)
Return whether the mutation can be applied to the database.
This will always return true. The mutation will safely handle the application no longer being around.