Created
August 29, 2019 00:45
-
-
Save austinhinderer/bca828331f444a781074e0bac30b160f to your computer and use it in GitHub Desktop.
Update ActiveRecord::Migrator.migrate in Ruby on Rails for 5.2.X
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
migration_path = Rails.root.join('db/migrate') | |
if ActiveRecord.gem_version >= ::Gem::Version.new("5.2.0") | |
ActiveRecord::MigrationContext.new(migration_path).migrate | |
else | |
ActiveRecord::Migrator.migrate(migration_path) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment