Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions db/migrate/114_fixes_buggy_articles_and_notes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading