В вашем конфигурационном файле (config / application.rb для всех сред или config / environment / $ (environment) .rb только для конкретной среды) добавьте эту строку:
config.paths['db/migrate'] += 'db/migrate/other_db'
И если вы хотитеизменить путь по умолчанию 'db / migrate' (config.paths ['db / migrate'] - это массив с одной строкой 'db / migrate' по умолчанию), сделать это:
config.paths['db/migrate'] = ['db/my_migrate']
Вот настройки по умолчанию.paths, которые мы также можем изменить:
"app" => ["app"],
"app/assets" => ["app/assets"],
"app/controllers" => ["app/controllers"],
"app/helpers" => ["app/helpers"],
"app/models" => ["app/models"],
"app/mailers" => ["app/mailers"],
"app/views" => ["app/views"],
"lib" => ["lib"],
"lib/assets" => ["lib/assets"],
"lib/tasks" => ["lib/tasks"],
"config" => ["config"],
"config/environments" => ["config/environments"],
"config/initializers" => ["config/initializers"],
"config/locales" => ["config/locales"],
"config/routes" => ["config/routes.rb"],
"db" => ["db"],
"db/migrate" => ["db/migrate"],
"db/seeds" => ["db/seeds.rb"],
"vendor" => ["vendor"],
"vendor/assets" => ["vendor/assets"],
"vendor/plugins" => ["vendor/plugins"],
"config/database" => ["config/database.yml"],
"config/environment" => ["config/environment.rb"],
"lib/templates" => ["lib/templates"],
"log" => ["log/development.log"],
"public" => ["public"],
"public/javascripts" => ["public/javascripts"],
"public/stylesheets" => ["public/stylesheets"],
"tmp" => ["tmp"],