class documentation

class AlterField(FieldOperation):

View In Hierarchy

Alter a field's database column (e.g. null, max_length) to the provided new field.
Method __init__ Undocumented
Method database​_backwards Perform the mutation on the database schema in the reverse direction - e.g. if this were CreateModel, it would in fact drop the model's table.
Method database​_forwards Perform the mutation on the database schema in the normal (forwards) direction.
Method deconstruct Return a 3-tuple of class import path (or just name if it lives under django.db.migrations), positional arguments, and keyword arguments.
Method describe Output a brief summary of what the action does.
Method reduce Return either a list of operations the actual operation should be replaced with or a boolean that indicates whether or not the specified operation can be optimized across.
Method state​_forwards Take the state from the previous migration, and mutate it so that it matches what this migration would perform.
Instance Variable preserve​_default Undocumented
Property migration​_name​_fragment A filename part suitable for automatically naming a migration containing this operation, or None if not applicable.

Inherited from FieldOperation:

Method is​_same​_field​_operation Undocumented
Method is​_same​_model​_operation Undocumented
Method references​_field Return True if there is a chance this operation references the given field name, with an app label for accuracy.
Method references​_model Return True if there is a chance this operation references the given model name (as a string), with an app label for accuracy.
Instance Variable field Undocumented
Instance Variable model​_name Undocumented
Instance Variable name Undocumented
Property model​_name​_lower Undocumented
Property name​_lower Undocumented

Inherited from Operation (via FieldOperation):

Method __new__ Undocumented
Method __repr__ Undocumented
Method allow​_migrate​_model Return whether or not a model may be migrated.
Class Variable atomic Undocumented
Class Variable elidable Undocumented
Class Variable reduces​_to​_sql Undocumented
Class Variable reversible Undocumented
Class Variable serialization​_expand​_args Undocumented
Instance Variable ​_constructor​_args Undocumented
def __init__(self, model_name, name, field, preserve_default=True):
def database_backwards(self, app_label, schema_editor, from_state, to_state):
Perform the mutation on the database schema in the reverse direction - e.g. if this were CreateModel, it would in fact drop the model's table.
def database_forwards(self, app_label, schema_editor, from_state, to_state):
Perform the mutation on the database schema in the normal (forwards) direction.
def deconstruct(self):
Return a 3-tuple of class import path (or just name if it lives under django.db.migrations), positional arguments, and keyword arguments.
def describe(self):
Output a brief summary of what the action does.
def reduce(self, operation, app_label):
Return either a list of operations the actual operation should be replaced with or a boolean that indicates whether or not the specified operation can be optimized across.
def state_forwards(self, app_label, state):
Take the state from the previous migration, and mutate it so that it matches what this migration would perform.
preserve_default =

Undocumented

@property
migration_name_fragment =
A filename part suitable for automatically naming a migration containing this operation, or None if not applicable.