0

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?

user1802143
  • 14,662
  • 17
  • 46
  • 55

1 Answers1

1

You can copy just the schema using pg_dump, then restore it in your new database.

pg_dump --schema-only
Joshua Moore
  • 24,706
  • 6
  • 50
  • 73