How can I integrate dbdocs into an existing repo for a postgres db

Hi there!

I just discovered dbdocs and I’m super impressed with the easy way to create documentation that is beautiful! :smiling_face_with_three_hearts:

I want to add documentation for an existing database, but I couldn’t find anything in the docs or this forum that would give any guidance. Please excuse me if this is a duplicate item.

How would I add dbdocs to an existing database? My goal is to understand and possibly refactor that database with the help of dbdocs.

It is a postgreSQL database, it will be hosted on a server, but for now it is running locally.

Many thanks!


Hi Leo,

Thank you for your question.

You can do the following steps to bring your existing PostgreSQL database to dbdocs:

  1. Export your database to a db.sql file using pg_dump command
  2. Import your db.sql file to dbdiagram
  3. Use the publish to dbdocs feature

We hope you find this information helpful.