From 1d382c3c4f1fe87ed8db36c96212d3b537a0c7df Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 29 Aug 2023 18:41:29 +0000 Subject: [PATCH] add dev tips for migration --- doc/development.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/development.md b/doc/development.md index 43dca2c7..94cbaaed 100644 --- a/doc/development.md +++ b/doc/development.md @@ -28,6 +28,14 @@ git submodule update --init then install requirements and pre-commit hook for `neodb-takahe` project (using a different venv is preferred) + +Migration +--------- +Always run `python3 manage.py migrate` for takahe first, before do that for neodb. + +If models in `takahe/models.py` are changed, just regenerate `takahe/migrations/0001_initial.py` instead of adding incremental migrations, because these migrations will never be applied except for constructing a test database. + + Run Test -------- `python3 manage.py test` will run the tests