Keep a table out of schema.rb during migrations

前端 未结 2 2012
鱼传尺愫
鱼传尺愫 2020-12-11 01:31

As a follow-on to an earlier question about not reloading a huge, persistent table when I run my tests, I need to keep this table out of schema.rb when I run my migrations.

2条回答
  •  渐次进展
    2020-12-11 02:13

    I think that if you keep the migration to generate the table out of your migrations folder, then it won't get run, and in turn won't be used to generate the development database, which should keep it out of the schema.rb.

    You can probably figure out some way to run that single migration if you need to outside of the rake task (should just be establishing the connection and then running up on the migration class)

提交回复
热议问题