fiedl/your_platform

View on GitHub
demo_app/my_platform/db/migrate/20171124102848_change_content_box_pages_to_embedded_pages.your_platform.rb

Summary

Maintainability
A
0 mins
Test Coverage
# This migration comes from your_platform (originally 20171124102624)
class ChangeContentBoxPagesToEmbeddedPages < ActiveRecord::Migration[5.0]
  def up
    Page.where(type: "Pages::ContentBox").update_all type: nil, embedded: true
  end
  def down
    Page.where(embedded: true).update_all type: "Pages::ContentBox"
  end
end