Step 1: Dump your postgresql create_table statements to a file:
pg_dump -s my_db_name > my_db_name_create.sql
- You will need to manually remove all statements except
CREATE TABLE,CREATE INDEX,CREATE_UNIQUE INDEX, etc.- Honestly just do it. It wont take too long, you'll be fine.
- Some statements you will definately need to remove are
SET,ALTER,CREATE SEQUENCE
- For
INDEXstatements we need to find-and-removeUSING btree