Migration
This class defines a database migration that modifies the user model's email field. It specifies a dependency on a previous authentication migration and executes an operation to update the email field's maximum length and verbose name.
Attributes
| Attribute | Type | Description |
|---|---|---|
| dependencies | list of tuples = [('auth', '0002_alter_permission_name_max_length')] | A list of migration identifiers that must be applied before this migration can be executed. |
| operations | list of migration operations | A list of schema or data changes to be applied to the database during the migration process. |
Methods
dependencies()
def dependencies() - > list
Defines the list of migration files that must be applied before this migration can be executed.
Returns
| Type | Description |
|---|---|
list | A list of tuples containing the app name and migration name dependencies. |
operations()
def operations() - > list
Specifies the sequence of database schema changes to be applied, such as altering the user email field constraints.
Returns
| Type | Description |
|---|---|
list | A list of migration operation instances to be executed by the database backend. |