How to manage schema in another database from rails application

I have a simple Rails application that populates into a specific database, and there are several migration scenarios. I would like to create another set of model classes and actually transfer the schema related to these files to another database. How do we do this? Will I be able to do this from the same rail?

+5
source share
1 answer

Well, change the database name to database.yml, then follow the usual steps, bundle exec rake db:setup should do the job.

Or you can create a separate database_2.yml and then create a database.rake file and follow the steps here

0
source

Source: https://habr.com/ru/post/1208012/


All Articles