diff --git a/db/migrate/114_fixes_buggy_articles_and_notes.rb b/db/migrate/114_fixes_buggy_articles_and_notes.rb index 30da3f9e..d9a8352e 100644 --- a/db/migrate/114_fixes_buggy_articles_and_notes.rb +++ b/db/migrate/114_fixes_buggy_articles_and_notes.rb @@ -34,14 +34,14 @@ def set_permalink def self.up say "Fixing contents permalinks, this may take some time" - contents = Content.where("permalink is ? or permalink = ?", nil, "") + contents = Content.where(permalink: nil).or Content.where(permalink: "") contents.each do |c| c.set_permalink c.save end say "Fixes empty notes GUID" - notes = Note.where("guid is ? or guid = ?", nil, "") + notes = Note.where(guid: nil).or Note.where(guid: "") notes.each do |n| n.create_guid n.save