Skip to content

Release 13.0.0: Feedback 3.0 Migrations

Dave Kaplan edited this page Nov 19, 2019 · 3 revisions

Migration to add section_type to all collection cards connected to questions:

# happens in the rake task
# CollectionCard.joins(:item).where(section_type: nil).merge(Item::QuestionItem.where.not(question_type: :question_finish)).update_all(section_type: 'ideas')

# CollectionCard.joins(:item).where(section_type: nil).merge(Item::QuestionItem.where(question_type: :question_finish)).update_all(section_type: 'outro')

Migrate old TestCollections:

run the rake task:

heroku run rake old_test_collections:migrate

Clone this wiki locally