Migrations in Rails Engine?

前端 未结 6 1602
暗喜
暗喜 2020-12-12 14:48

I have multiple rails applications talking to the same backend and I\'d like them to share some migrations.
I setup a rails engine (with enginex), I can share anything (

6条回答
  •  失恋的感觉
    2020-12-12 14:51

    As of Rails 3.1 looks like the solution is:

    bundle exec rake railties:install:migrations
    

    If you only want to copy from a specific railtie then:

    bundle exec rake railties:install:migrations FROM=foo_engine
    

    Note the name is whatever you gem is named plus _engine. So if the gem is "foo" then the name is foo_engine.

提交回复
热议问题