Skip to content
This repository has been archived by the owner on Jun 22, 2020. It is now read-only.

A plugin to make it easier to host migrations for multiple databases in one rails app. This plugin doesn't work with rails 3+ and has been superseded by https://github.com/chrisrohr/multi-database-migrations

License

Notifications You must be signed in to change notification settings

jystewart/multi-database-migrations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A plugin to make it easier to host migrations for multiple databases in one rails app.

=======
WARNING
=======

This plugin is no longer maintained and will not work Rails 3 and onwards. 

Chris Rohr has ported it to Rails 3 and you probably want to use his version:

https://github.com/chrisrohr/multi-database-migrations


=======
CONCEPT
=======

Rather than mixing all the migrations in one folder and relying on the specific migration to define which database it works with, we have separate folders for each database. Supposing you had a normal database--myapp_development--and a legacy database--legacy_development--we'd have something like:

  db/migrate
    db/migrate/myapp
    db/migrate/legacy
    
and each database's migrations sit in the relevant folder.

=====
USAGE
=====

With the plugin installed we have:

  script/generate multi_migration DBName MigrationName ....

which should accept all the options of a normal migration generation, and

  rake db:multi:migrate DATABASE=xxxx

normally we would expect the database name to match rails' conventions, eg:
  
  rake db:multi:migrate DATABASE=myapp
  
would look for a database configuration of myapp_development. But if you specify a full database name, we will look for a configuration with a matching database name.

======
CREDIT
======

This plugin is by James Stewart - http://jystewart.net/process/

About

A plugin to make it easier to host migrations for multiple databases in one rails app. This plugin doesn't work with rails 3+ and has been superseded by https://github.com/chrisrohr/multi-database-migrations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages