Reputation: 266910
Say I have a User model, and I want to setup postgresql with 2 schemas:
test1.users
test2.users
Is there a way to specify the schema I want to use when running migrations?
rake db:migrate schema=test1
Upvotes: 0
Views: 1392
Reputation: 239230
Add an environment, call it "test2", and define your schema in config/database.yml. Then run your migration with RAILS_ENV=test2 rake db:migrate
.
Upvotes: 2