Run a single migration file

后端 未结 11 748
说谎
说谎 2020-11-30 16:01

Is there an easy way to run a single migration? I don\'t want to migrate to a certain version I just want to run a specific one.

11条回答
  •  青春惊慌失措
    2020-11-30 17:02

    If you're having trouble with paths you can use

    require Rails.root + 'db/migrate/20090408054532_add_foos.rb'
    

提交回复
热议问题