Sha256: 35f33c6ede6481e84bc827cdb7f93ac0037bf838ebf099c58c2c424abda6f77b
Contents?: true
Size: 486 Bytes
Versions: 39
Compression:
Stored size: 486 Bytes
Contents
class AddNestedSetsToPandaCmsPages < ActiveRecord::Migration[7.1] def self.up PandaCms::Page.where(parent_id: 0).update_all(parent_id: nil) add_column :panda_cms_pages, :lft, :integer add_column :panda_cms_pages, :rgt, :integer # This is necessary to update :lft and :rgt columns PandaCms::Page.reset_column_information PandaCms::Page.rebuild! end def self.down remove_column :panda_cms_pages, :lft remove_column :panda_cms_pages, :rgt end end
Version data entries
39 entries across 39 versions & 1 rubygems