Skip to content

Commit

Permalink
docs: Regenerate the ERD (no changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 29, 2024
1 parent e937b9b commit 370a080
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
11 changes: 1 addition & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
# Editor temporary files and local virtual environment.
*.swp
*~
/.ve
# Python caches.
__pycache__
/.pytest_cache
# Coverage and documentation.
/.coverage*
/.coverage
/htmlcov
/docs/_build
# Kingfisher
/.env
/error.log
/info.log
# SchemaSpy
/postgresql.jar
/schemaspy.jar
/schemaspy
Binary file modified docs/_static/erd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ If the ``release_type`` is "record", then the record's ``compiledRelease`` field

Foreign key relationships exist on all `tables <https://www.postgresql.org/docs/current/sql-createtable.html>`__ (but not `views <https://www.postgresql.org/docs/current/sql-createview.html>`__) within a schema, as shown in the Entity Relationship Diagram (click on the image and zoom in to read more easily).

.. image:: _static/erd.png
:target: _static/erd.png
.. image:: _static/relationships.real.compact.png
:target: _static/relationships.real.compact.png

This diagram can help to identify JOIN conditions. For example, all tables can be joined with the ``release_summary_no_data`` and ``release_summary`` tables on the ``id`` column.

Expand Down
7 changes: 6 additions & 1 deletion docs/develop/howtos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,9 @@ Add a schema with the ``--tables-only`` option:
./manage.py add 123 diagram --tables-only
`Use SchemaSpy <https://ocp-software-handbook.readthedocs.io/en/latest/services/postgresql.html#entity-relationship-diagram>`__ to generate a diagram, copying the output to ``docs/_static/erd.png``.
Then, `update <https://ocp-software-handbook.readthedocs.io/en/latest/services/postgresql.html#generate-entity-relationship-diagram>`__ the :ref:`erd`. For example:

.. code-block:: bash
java -jar schemaspy.jar -t pgsql -dp postgresql.jar -o schemaspy -norows -host localhost -db kingfisher_summarize -s summary_collection_1 -u MYUSER
mv schemaspy/diagrams/summary/relationships.real.compact.png docs/_static/

0 comments on commit 370a080

Please sign in to comment.