Reputation: 15682
I'd like to create a new database with the same tables/fields as an existing database. I don't need any of the rows, I just need the schema. Is there a way to do this?
Upvotes: 0
Views: 44
Reputation: 24776
You can copy just the schema using pg_dump, then restore it in your new database.
pg_dump --schema-only
Upvotes: 1