Skip to content

Commit

Permalink
Add data migration to backfill missing document slugs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgisbey committed Dec 19, 2023
1 parent 391f33d commit d120258
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Document.where(slug: nil).each do |document|
document.update_column(:slug, document.id.to_s)
end

0 comments on commit d120258

Please sign in to comment.