Sha256: f5b5e14068ca9d6ed2280bbbae2f74506769f44c404efc7ce15225c8fa87e5c7
Contents?: true
Size: 350 Bytes
Versions: 7
Compression:
Stored size: 350 Bytes
Contents
class AddDepthToPandaCmsMenus < ActiveRecord::Migration[7.2] def change add_column :panda_cms_menus, :depth, :integer, null: true, default: nil homepage = PandaCms::Page.find_by(path: "/") if homepage main_menu = PandaCms::Menu.find_by(start_page_id: homepage.id, kind: :auto) main_menu&.update(depth: 2) end end end
Version data entries
7 entries across 7 versions & 1 rubygems