From 98db07466c0a438a31fcba1bc27e00aefe41b382 Mon Sep 17 00:00:00 2001 From: Ben Selwyn-Smith Date: Mon, 17 Mar 2025 10:52:02 +1000 Subject: [PATCH] chore: add database diagram instructions Signed-off-by: Ben Selwyn-Smith --- docs/source/pages/developers_guide/index.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/source/pages/developers_guide/index.rst b/docs/source/pages/developers_guide/index.rst index eb56d1e6b..084e86b0d 100644 --- a/docs/source/pages/developers_guide/index.rst +++ b/docs/source/pages/developers_guide/index.rst @@ -231,3 +231,18 @@ some examples. style_guide apidoc/index + +----------------------------- +Updating the database diagram +----------------------------- + +Macaron uses a visual representation of its database to better help developers understand the relationships between the tables within it. +This diagram is created using the `eralchemy2 `_ an entity relation diagrams generator Python library. +When modifications have been made to Macaron's database, the representative diagram needs to be regenerated to match. +This can be done using the following command: + +.. code-block:: bash + + eralchemy2 -i 'sqlite:////macaron.db' -o er-diagram.svg + +Where ```` is the location of Macaron's output folder. The resulting diagram can then replace the previous version found at ``docs/source/assets/er-diagram.svg``