Raise when unsupported db vendor, and add option to specify SQL analyser
This commit is contained in:
1 parent
71ddadda05
commit
76a55dbb12
7 files changed
+71
-33
No files matched your search
+21
-20
@@ -19,26 +19,27 @@ The three main usages are:
|
||||
|
||||
Below the detailed command line options, which can all also be defined using a config file (`setup.cfg`, `tox.ini`, `pyproject.toml`, `.django_migration_linter.cfg`):
|
||||
|
||||
| Parameter | Description |
|
||||
|--------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
|`--git-commit-id GIT_COMMIT_ID` | If specified, only migrations since this commit will be taken into account. |
|
||||
|`--ignore-name-contains IGNORE_NAME_CONTAINS` | Ignore migrations containing this name. |
|
||||
|`--ignore-name IGNORE_NAME [IGNORE_NAME ...]` | Ignore migrations with exactly one of these names. |
|
||||
|`--include-name-contains INCLUDE_NAME_CONTAINS` | Include migrations containing this name. |
|
||||
|`--include-name INCLUDE_NAME [INCLUDE_NAME ...]` | Include migrations with exactly one of these names. |
|
||||
|`--include-apps INCLUDE_APPS [INCLUDE_APPS ...]` | Check only migrations that are in the specified django apps. |
|
||||
|`--exclude-apps EXCLUDE_APPS [EXCLUDE_APPS ...]` | Ignore migrations that are in the specified django apps. |
|
||||
|`--exclude-migration-tests MIGRATION_TEST_CODE [...]` | Specify backward incompatible migration tests to be ignored using the code (e.g. ALTER_COLUMN). |
|
||||
|`--verbosity or -v {0,1,2,3}` | Print more information during execution. |
|
||||
|`--database DATABASE` | Specify the database for which to generate the SQL. Defaults to *default*. |
|
||||
|`--cache-path PATH` | specify a directory that should be used to store cache-files in. |
|
||||
|`--no-cache` | Don't use a cache. |
|
||||
|`--applied-migrations` | Only lint migrations that are applied to the selected database. Other migrations are ignored. |
|
||||
|`--unapplied-migrations` | Only lint migrations that are not yet applied to the selected database. Other migrations are ignored. |
|
||||
|`--project-root-path DJANGO_PROJECT_FOLDER` | An absolute or relative path to the django project. |
|
||||
|`--include-migrations-from FILE_PATH` | If specified, only migrations listed in the given file will be considered. |
|
||||
|`--quiet or -q {ok,ignore,warning,error}` | Suppress certain output messages, instead of writing them to stdout. |
|
||||
|`--warnings-as-errors` | Handle warnings as errors and therefore return an error status code if we should. |
|
||||
| Parameter | Description |
|
||||
|-------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
|
||||
| `--git-commit-id GIT_COMMIT_ID` | If specified, only migrations since this commit will be taken into account. |
|
||||
| `--ignore-name-contains IGNORE_NAME_CONTAINS` | Ignore migrations containing this name. |
|
||||
| `--ignore-name IGNORE_NAME [IGNORE_NAME ...]` | Ignore migrations with exactly one of these names. |
|
||||
| `--include-name-contains INCLUDE_NAME_CONTAINS` | Include migrations containing this name. |
|
||||
| `--include-name INCLUDE_NAME [INCLUDE_NAME ...]` | Include migrations with exactly one of these names. |
|
||||
| `--include-apps INCLUDE_APPS [INCLUDE_APPS ...]` | Check only migrations that are in the specified django apps. |
|
||||
| `--exclude-apps EXCLUDE_APPS [EXCLUDE_APPS ...]` | Ignore migrations that are in the specified django apps. |
|
||||
| `--exclude-migration-tests MIGRATION_TEST_CODE [...]` | Specify backward incompatible migration tests to be ignored using the code (e.g. ALTER_COLUMN). |
|
||||
| `--verbosity or -v {0,1,2,3}` | Print more information during execution. |
|
||||
| `--database DATABASE` | Specify the database for which to generate the SQL. Defaults to *default*. |
|
||||
| `--cache-path PATH` | specify a directory that should be used to store cache-files in. |
|
||||
| `--no-cache` | Don't use a cache. |
|
||||
| `--applied-migrations` | Only lint migrations that are applied to the selected database. Other migrations are ignored. |
|
||||
| `--unapplied-migrations` | Only lint migrations that are not yet applied to the selected database. Other migrations are ignored. |
|
||||
| `--project-root-path DJANGO_PROJECT_FOLDER` | An absolute or relative path to the django project. |
|
||||
| `--include-migrations-from FILE_PATH` | If specified, only migrations listed in the given file will be considered. |
|
||||
| `--quiet or -q {ok,ignore,warning,error}` | Suppress certain output messages, instead of writing them to stdout. |
|
||||
| `--warnings-as-errors` | Handle warnings as errors and therefore return an error status code if we should. |
|
||||
| `--sql-analyser` | Specify the SQL analyser that should be used. Allowed values: 'sqlite', 'mysql', 'postgresql'. |
|
||||
|
||||
## File configuration
|
||||
|
||||
|
||||
Reference in new issue
Block a user