$ sudo apt-get install postgresql-autodoc
or install it from source:
$ wget http://www.rbt.ca/autodoc/binaries/postgresql_autodoc-1.40.tar.gz
$ tar -xvfz postgresql_autodoc-1.40.tar.gz
$ cd postgresql_autodoc
$ sudo make install
Now run postgresql-autodoc with an appropriate database connection:
$ postgresql_autodoc -h localhost -p 5432 -d lasma -U lasma
This will generate a bunch of files containing your database schema.
Further you may use GraphViz dot utility to make a neat diagram in vector or raster format.
$ sudo apt-get install graphviz
$ dot -Tdia -o output_lasma.dia lasma.dot #output dia diagram
$ dot -Tpng -o output_lasma.png lasma.dot #output png image
2 comments:
Šito nezināju, noderēs :)
Check out pgDesigner for cool GUI tool (for Lunix only)...
Post a Comment