Add type for each migration linter check

Add to the docs whether it raises an error or warning by default
This commit is contained in:
David Wobrock committed 2021-12-20 22:03:28 +01:00
1 parent d81a6720ef
commit 967047d4e6
1 file changed
+17 -17
+17 -17
View File
@@ -25,20 +25,20 @@ On data migrations, the linter will show a warning when:
You can ignore checks through the `--exclude-migration-tests` option by specifying any of the codes: You can ignore checks through the `--exclude-migration-tests` option by specifying any of the codes:
| Code | Description | | Code | Description | Default type |
|-----------------------------------|----------------------------------------------------------------------| |-----------------------------------|----------------------------------------------------------------------|----------------------|
|`NOT_NULL` | Not NULL constraint on columns |`NOT_NULL` | Not NULL constraint on columns | Error
|`DROP_COLUMN` | Dropping columns |`DROP_COLUMN` | Dropping columns | Error
|`DROP_TABLE` | Dropping tables |`DROP_TABLE` | Dropping tables | Error
|`RENAME_COLUMN` | Renaming columns |`RENAME_COLUMN` | Renaming columns | Error
|`RENAME_TABLE` | Renaming tables |`RENAME_TABLE` | Renaming tables | Error
|`ALTER_COLUMN` | Altering columns (could be backward compatible) |`ALTER_COLUMN` | Altering columns (could be backward compatible) | Error
|`ADD_UNIQUE` | Add unique constraints |`ADD_UNIQUE` | Add unique constraints | Error
|`RUNPYTHON_REVERSIBLE` | RunPython data migration is not reversible (missing reverse code) |`RUNPYTHON_REVERSIBLE` | RunPython data migration is not reversible (missing reverse code) | Warning
|`RUNPYTHON_ARGS_NAMING_CONVENTION` | By convention, RunPython names two arguments: apps, schema_editor |`RUNPYTHON_ARGS_NAMING_CONVENTION` | By convention, RunPython names two arguments: apps, schema_editor | Warning
|`RUNPYTHON_MODEL_IMPORT` | Missing apps.get_model() calls for model |`RUNPYTHON_MODEL_IMPORT` | Missing apps.get_model() calls for model | Error
|`RUNPYTHON_MODEL_VARIABLE_NAME` | The model variable name is different from the model class itself |`RUNPYTHON_MODEL_VARIABLE_NAME` | The model variable name is different from the model class itself | Warning
|`RUNSQL_REVERSIBLE` | RunSQL data migration is not reversible (missing reverse SQL) |`RUNSQL_REVERSIBLE` | RunSQL data migration is not reversible (missing reverse SQL) | Warning
|`CREATE_INDEX` | (Postgresql specific) Creating an index without the concurrent keyword will lock the table and may generate downtime |`CREATE_INDEX` | (Postgresql specific) Creating an index without the concurrent keyword will lock the table and may generate downtime | Warning
|`DROP_INDEX` | (Postgresql specific) Dropping an index without the concurrent keyword will lock the table and may generate downtime |`DROP_INDEX` | (Postgresql specific) Dropping an index without the concurrent keyword will lock the table and may generate downtime | Warning
|`REINDEX` | (Postgresql specific) Reindexing will lock the table and may generate downtime |`REINDEX` | (Postgresql specific) Reindexing will lock the table and may generate downtime | Warning