Skip to content

Commit 075cb7d

Browse files
authored
docs: add database diagram instructions (#1017)
Signed-off-by: Ben Selwyn-Smith <[email protected]>
1 parent 82c184f commit 075cb7d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/source/pages/developers_guide/index.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,18 @@ some examples.
231231

232232
style_guide
233233
apidoc/index
234+
235+
-----------------------------
236+
Updating the database diagram
237+
-----------------------------
238+
239+
Macaron uses a visual representation of its database to better help developers understand the relationships between the tables within it.
240+
This diagram is created using the `eralchemy2 <https://pypi.org/project/eralchemy2/>`_ an entity relation diagrams generator Python library.
241+
When modifications have been made to Macaron's database, the representative diagram needs to be regenerated to match.
242+
This can be done using the following command:
243+
244+
.. code-block:: bash
245+
246+
eralchemy2 -i 'sqlite:///<path_to_output>/macaron.db' -o er-diagram.svg
247+
248+
Where ``<path_to_output>`` 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``

0 commit comments

Comments
 (0)