Skip to content

Commit

Permalink
correct name of ContentBlockManager engine in migration
Browse files Browse the repository at this point in the history
although it is not good practice to edit past
migrations, we think this is safe to do as it
doesn't change the actual migration, and not
changing it could cause problems/confusion in the
future.
  • Loading branch information
Harriethw committed Oct 10, 2024
1 parent 8260e14 commit f3e4b30
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class AddLatestEditionInfoToContentBlockDocuments < ActiveRecord::Migration[7.1]
def up
ContentObjectStore::ContentBlock::Document.find_each do |document|
ContentBlockManager::ContentBlock::Document.find_each do |document|
if document.latest_edition_id.nil? || document.live_edition_id.nil?
document.update!(
latest_edition_id: document.content_block_editions.last.id,
Expand All @@ -11,7 +11,7 @@ def up
end

def down
ContentObjectStore::ContentBlock::Document.update_all(
ContentBlockManager::ContentBlock::Document.update_all(
latest_edition_id: nil,
live_edition_id: nil,
)
Expand Down

0 comments on commit f3e4b30

Please sign in to comment.