PG_SCHEMA option removed
xinspire opened this issue · 3 comments
I was trying to dump a PostgreSQL schema to seed.rb, but it wasn't dumping the specified schema. Digging deeper, I noticed that the PG_SCHEMA option was removed shortly after v1.0.0. What's the reasoning behind its removal?
What's the best practice or workaround on this? (I have a template schema that I modify via my app, and every now and then, I'd like to capture its state using a seed file.)
Thanks!
can't you just use the built in rails rake task?
rake db:schema:dump
This is invoked automatically whenever you run migrations ( rake db:migrate ). That's how the schema.rb file gets updated.
See: http://edgeguides.rubyonrails.org/active_record_migrations.html#running-migrations
I have multiple schemas in my PostgreSQL database. My understanding was that PG_SCHEMA allowed one to dump the data of say, schema_n, into an .rb file. I'm not trying to generate schema.rb.