Reputation: 5644
Ok, I'm a mobile developer trying to learn backend development.
I have two AWS RDS instances running postgresql. One for development and one for production.
The scenario is that the development data base is operated on. Create tables, add postgis, new relationships, what ever.
Now, I want to go put all those schema changes into the production database. Obviously I don't want to migrate development data to production, just the schema and db changes.
What do I do?
Upvotes: 1
Views: 1064
Reputation: 181430
You can dump schema only:
pg_dump -s databasename > your_schema.sql
Then you restore the dumped schema from your_schema.sql
by running on the production sever:
psql < your_schema.sql
Use user/pass options as needed.
Upvotes: 2