File: db-schema-documentation-HOWTO.md

package info (click to toggle)
gvmd 26.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 9,240 kB
  • sloc: ansic: 140,982; sh: 4,171; xml: 1,860; python: 301; makefile: 24
file content (22 lines) | stat: -rw-r--r-- 960 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Generating Database Schema Documentation

If a visual representation of the relationship between the various entities in
the database is required, documentation in different formats can be generated
with a number of third-party tools.

As the schema documentation is based on an already initialized database, a
running PostgreSQL server is required to generate a new documentation.

The documentation can be generated with
[postgresql_autodoc](https://github.com/cbbrowne/autodoc). Provided
`postgresql_autodoc` is running as the same user who created the database, it is
sufficient to execute the following command to generate the HTML documentation:

    postgresql_autodoc -t html -d gvmd

The PNG documentation can be created by creating a documentation in the `dot`
format and then using the `dot` command provided by
[GraphViz](https://www.graphviz.org/) to generate a PNG file:

    postgresql_autodoc -t dot -d gvmd
    dot -Tpng gvmd.dot > gvmd.png