From 0bc6a4219237b8b6998f8eaa31f375ea533cac69 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 3 Apr 2018 01:20:44 -0400 Subject: [PATCH] Improve the way missing migrations are check. GitLab issue #278. Signed-off-by: Roberto Rosario --- Makefile | 5 +++++ docs/releases/3.0.rst | 1 + docs/topics/development.rst | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3a48b6be10..a5e6bcef15 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ help: @echo "clean - Remove Python and build artifacts." @echo "generate_setup - Create and updated setup.py" @echo "check_readme - Checks validity of the README.rst file for PyPI publication." + @echo "check_missing_migrations - Make sure all models have proper migrations." @echo "test-all - Run all tests." @echo "test MODULE= - Run tests for a single app, module or test class." @@ -356,3 +357,7 @@ build: check_readme: python setup.py check -r -s + +check_missing_migrations: + ./manage.py makemigrations --dry-run --noinput --check + diff --git a/docs/releases/3.0.rst b/docs/releases/3.0.rst index 07be7ad7cf..64012f7d4d 100644 --- a/docs/releases/3.0.rst +++ b/docs/releases/3.0.rst @@ -430,6 +430,7 @@ Bugs fixed or issues closed =========================== * `GitLab issue #262 `_ Event notifications +* `GitLab issue #278 `_ Detect non migrated models * `GitLab issue #302 `_ 'New Document' button available to users who do not have permission * `GitLab issue #454 `_ Invalid next month calculation in statistics app, causes failstop diff --git a/docs/topics/development.rst b/docs/topics/development.rst index f77a304bb0..7f0d12ac7a 100644 --- a/docs/topics/development.rst +++ b/docs/topics/development.rst @@ -404,7 +404,7 @@ Release checklist 1. Check for missing migrations:: - $ ./manage.py makemigrations + $ make check_missing_migrations 2. Synchronize translations:: @@ -419,14 +419,14 @@ Release checklist 6. Update requirements version in `setup.py` 7. Bump version in `mayan/__init__.py` 8. Check README.rst format with:: - + $ python setup.py check -r -s or with:: $ make check_readme - + 9. Build source package and test:: $ make test_sdist_via_docker_ubuntu