diff options
| author | 0livd <github@destras.fr> | 2018-10-13 18:36:08 +0200 |
|---|---|---|
| committer | Alexis Métaireau <alexis@vieuxsinge.com> | 2018-12-25 17:40:06 +0100 |
| commit | 6ca99a340c9988fbb90793851f5ff91453a1023c (patch) | |
| tree | acaf1424515983e96c8ccea5daa2aa0f99f269d0 /docs/contributing.rst | |
| parent | cdbcd763ef53b521d72b06dd568a0fd8f019dacb (diff) | |
| download | ihatemoney-mirror-6ca99a340c9988fbb90793851f5ff91453a1023c.zip ihatemoney-mirror-6ca99a340c9988fbb90793851f5ff91453a1023c.tar.gz ihatemoney-mirror-6ca99a340c9988fbb90793851f5ff91453a1023c.tar.bz2 | |
Document database migrations
Closes #390
Diffstat (limited to 'docs/contributing.rst')
| -rw-r--r-- | docs/contributing.rst | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst index 1944d67..bcb3f16 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -39,7 +39,6 @@ Accessing dev server In any case, you can point your browser at `http://localhost:5000 <http://localhost:5000>`_. It's as simple as that! - Updating -------- @@ -47,6 +46,22 @@ In case you want to update to newer versions (from git), you can just run the "u make update +Create database migrations +-------------------------- + +In case you need to modify the database schema, first update the models in ihatemoney/models.py. +Then run the following command to create a new database revision file:: + + make create-database-revision + +If your changes are simple enough, the generated script will be populated with +the necessary migrations steps. You can edit the generated script. eg: to add data migrations. + +For complex migrations, it is recommended to start from an empty revision file which can be created +with the following command:: + + make create-empty-database-revision + Useful settings ---------------- |
