How to create migration in subdirectory with Rails?

Posted by Adrian Serafin on Stack Overflow See other posts from Stack Overflow or by Adrian Serafin
Published on 2011-01-08T19:42:37Z Indexed on 2011/01/08 21:53 UTC
Read the original article Hit count: 430

Hi!

I'm writing SaaS model application. My application database consist of two logic parts:

  • application tables - such as user, roles...
  • user defined tables (he can generate them from ui level) that can be different for each application instance

All tables are created by rails migrations mechanism.

I would like to put user defined tables in another directory:

  • db/migrations - application tables
  • db/migrations/custom - tables generated by user

so i can do svn:ignore on db/migrations/custom, and when I do updates of my app on clients servers it would only update application tables migrations.

Is there any way to achieve this in rails?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about activerecord