Created
February 28, 2019 21:36
-
-
Save mmontalvo/fe945059f85b10598363428c2333bffb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
file_names = Dir["db/migrate/*"] | |
file_names.each do |file_name| | |
lines = File.readlines(file_name) | |
lines[0] = lines[0].gsub('ActiveRecord::Migration', 'ActiveRecord::Migration[5.2]') | |
File.open(file_name, 'w') { |f| f.write(lines.join) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment