Created
March 6, 2019 07:42
-
-
Save bonekost/ceb299bdf54545b5fe46832b2691e716 to your computer and use it in GitHub Desktop.
Add migration release to all
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir.glob('./db/migrate/*.rb') do |file| | |
text = File.read(file) | |
new_content = text.gsub(/< ActiveRecord::Migration/, "< ActiveRecord::Migration[4.2]") | |
File.open(file, "w") {|f| f.puts new_content } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment