diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c03572..a60040a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.4.0 + +* Add `--include-migrations-from` option to only consider migrations specified in a given file. +No matter if the migrations are selected from a git commit or not, we only select the ones in the given file. + ## 1.3.0 * Add `--exclude-migration-tests` option to ignore backward incompatible migration tests. diff --git a/README.rst b/README.rst index db00f41..866da9e 100644 --- a/README.rst +++ b/README.rst @@ -43,7 +43,7 @@ Add the migration linter your ``INSTALLED_APPS``: ] -``python manage.py lintmigrations [GIT_COMMIT_ID] [--ignore-name-contains IGNORE_NAME_CONTAINS] [--include-apps INCLUDE_APPS [INCLUDE_APPS ...] | --exclude-apps EXCLUDE_APPS [EXCLUDE_APPS ...]] [--exclude-migration-tests MIGRATION_TEST_CODE [MIGRATION_TEST_CODE ...]] [--project-root-path DJANGO_PROJECT_FOLDER]`` +``python manage.py lintmigrations [GIT_COMMIT_ID] [--ignore-name-contains IGNORE_NAME_CONTAINS] [--include-apps INCLUDE_APPS [INCLUDE_APPS ...] | --exclude-apps EXCLUDE_APPS [EXCLUDE_APPS ...]] [--exclude-migration-tests MIGRATION_TEST_CODE [MIGRATION_TEST_CODE ...]] [--project-root-path DJANGO_PROJECT_FOLDER] [--include-migrations-from FILE_PATH]`` ================================================================ =========================================================================================================================== Parameter Description @@ -61,6 +61,7 @@ Add the migration linter your ``INSTALLED_APPS``: ``--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. ================================================================ =========================================================================================================================== Examples @@ -102,6 +103,8 @@ You can also ignore migrations by adding this to your migrations: ] # ... +Or you can restrict the migrations that should be selected by a file containing there paths with the ``--include-migrations-from`` option. + Ignoring migration tests ------------------------