With MySql Workbench, I could create all tables of a database with EER-Diagram, and then do File/Export/Forward Engineer SQL Create Script to generate a sql file that creates the db plus all tables of the db. In Postgresql, with pgAdmin4 or DBeaver, I have created all tables under database/schema, is there any similar way to generate a sql file to create the db and all tables of the db?
You export only schema without data using pg_dump in psql [terminal]:
pg_dump -U postgres -s databasename > backup.sql
or with Pgadmin4
only schema in the Dump option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With