diff --git a/db/migrate/20120530005915_rename_klass_to_error_class.rb b/db/migrate/20120530005915_rename_klass_to_error_class.rb index 8644ff2..ceab8a1 100644 --- a/db/migrate/20120530005915_rename_klass_to_error_class.rb +++ b/db/migrate/20120530005915_rename_klass_to_error_class.rb @@ -1,13 +1,13 @@ class RenameKlassToErrorClass < Mongoid::Migration def self.up [Problem, Err, Notice].each do |model| - model.collection.update({}, {'$rename' => {'klass' => 'error_class'}}, multi: true, safe: true) + model.collection.update({}, {'$rename' => {'klass' => 'error_class'}}, :multi => true, :safe => true) end end def self.down [Problem, Err, Notice].each do |model| - model.collection.update({}, {'$rename' => {'error_class' => 'klass'}}, multi: true, safe: true) + model.collection.update({}, {'$rename' => {'error_class' => 'klass'}}, :multi => true, :safe => true) end end end diff --git a/db/migrate/20120603112130_change_github_url_to_github_repo.rb b/db/migrate/20120603112130_change_github_url_to_github_repo.rb index 5bda698..76b6d87 100644 --- a/db/migrate/20120603112130_change_github_url_to_github_repo.rb +++ b/db/migrate/20120603112130_change_github_url_to_github_repo.rb @@ -1,6 +1,6 @@ class ChangeGithubUrlToGithubRepo < Mongoid::Migration def self.up - App.collection.update({}, {'$rename' => {'github_url' => 'github_repo'}}, multi: true, safe: true) + App.collection.update({}, {'$rename' => {'github_url' => 'github_repo'}}, :multi => true, :safe => true) App.all.each do |app| app.send :normalize_github_repo app.save @@ -8,7 +8,7 @@ class ChangeGithubUrlToGithubRepo < Mongoid::Migration end def self.down - App.collection.update({}, {'$rename' => {'github_repo' => 'github_url'}}, multi: true, safe: true) + App.collection.update({}, {'$rename' => {'github_repo' => 'github_url'}}, :multi => true, :safe => true) App.all.each do |app| unless app.github_repo.include?("github.com") app.update_attribute :github_url, "https://github.com/" << app.github_url -- libgit2 0.21.2