Forum: Ruby on Rails Use Migrations in modules in separate source trees?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3a6666f57152610f172a77c8fe6a7420?d=identicon&s=25 Marcus Andersson (Guest)
on 2006-03-16 11:17
(Received via mailing list)
We have a scenario where we have a core engine with module add-ons. What
modules that will be used differ from deployment to deployment. Each of
these modules might need different things in the db (both structure and
data) and I want each module to be in charge of its own db structure.
Each module is contained in its own source directory and what modules to
use is determined in the build process (each module has it's own build
script (with some inherited from a "main" build script) and I want db
scripts to be executed in this process).

I really like Migrations and would like to use it. Is it possible to use
in a scenario like this? What do I need to do in order to make it work
(if possible)? Keep in mind that all modifications from all modules goes
into the same database and that the order of how the module build
scripts are executed might vary from deployment to deployment so the
numbering scheme and schema_info table might be troublesome in this
case. I guess I need to be able to get a module name/code into it
somewhere somehow.

Any answers/ideas appreciated!

/Marcus
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-03-16 11:51
(Received via mailing list)
You should look at the migrations stuff in Rails Engines - you might
find you can use this straight out of the box. If you treat each one
of your 'modules' as an engine, you'll have access to the migrations
in each module and the ability to migrate individual modules up and
down as necessary.

  http://rails-engines.org
  http://api.rails-engines.org/engines/ (section 'Migrating Engines')

- james

On 3/16/06, Marcus Andersson <m-lists@bristav.se> wrote:
> in a scenario like this? What do I need to do in order to make it work
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
* J *
  ~
This topic is locked and can not be replied to.