Rename data migration lint checks
This commit is contained in:
1 parent
1824410ac5
commit
4b15e11faa
4 files changed
+32
-22
No files matched your search
+14
-14
@@ -25,17 +25,17 @@ On data migrations, the linter will show a warning when:
|
||||
|
||||
You can ignore check through the `--exclude-migration-test` option and specifying any of the codes:
|
||||
|
||||
| Code | Description |
|
||||
|-------------------------------------|----------------------------------------------------------------------|
|
||||
|`NOT_NULL` | Not NULL constraint on columns
|
||||
|`DROP_COLUMN` | Dropping columns
|
||||
|`DROP_TABLE` | Dropping tables
|
||||
|`RENAME_COLUMN` | Renaming columns
|
||||
|`RENAME_TABLE` | Renaming tables
|
||||
|`ALTER_COLUMN` | Altering columns (could be backward compatible)
|
||||
|`ADD_UNIQUE` | Add unique constraints
|
||||
|`REVERSIBLE_DATA_MIGRATION` | RunPython data migration is not reversible (missing reverse code)
|
||||
|`NAMING_CONVENTION_RUNPYTHON_ARGS` | By convention, RunPython names two arguments: apps, schema_editor
|
||||
|`DATA_MIGRATION_MODEL_IMPORT` | Missing apps.get_model() calls for model
|
||||
|`DATA_MIGRATION_MODEL_VARIABLE_NAME` | The model variable name is different from the model class itself
|
||||
|`REVERSIBLE_RUNSQL_DATA_MIGRATION` | RunSQL data migration is not reversible (missing reverse SQL)
|
||||
| Code | Description |
|
||||
|-----------------------------------|----------------------------------------------------------------------|
|
||||
|`NOT_NULL` | Not NULL constraint on columns
|
||||
|`DROP_COLUMN` | Dropping columns
|
||||
|`DROP_TABLE` | Dropping tables
|
||||
|`RENAME_COLUMN` | Renaming columns
|
||||
|`RENAME_TABLE` | Renaming tables
|
||||
|`ALTER_COLUMN` | Altering columns (could be backward compatible)
|
||||
|`ADD_UNIQUE` | Add unique constraints
|
||||
|`RUNPYTHON_REVERSIBLE` | RunPython data migration is not reversible (missing reverse code)
|
||||
|`RUNPYTHON_ARGS_NAMING_CONVENTION` | By convention, RunPython names two arguments: apps, schema_editor
|
||||
|`RUNPYTHON_MODEL_IMPORT` | Missing apps.get_model() calls for model
|
||||
|`RUNPYTHON_MODEL_VARIABLE_NAME` | The model variable name is different from the model class itself
|
||||
|`RUNSQL_REVERSIBLE` | RunSQL data migration is not reversible (missing reverse SQL)
|
||||
Reference in new issue
Block a user