Sha256: daa9d29e7abc77df1bb6ec327c118e5dfb4f77fda087441894e5c0944fd1e25f
Contents?: true
Size: 562 Bytes
Versions: 9
Compression:
Stored size: 562 Bytes
Contents
# This migration comes from tb_blog (originally 20121113135812) class AddNestedSetToPostCategories < ActiveRecord::Migration def up change_table :spud_post_categories do |t| t.integer :lft t.integer :rgt t.integer :depth end # Populates lft, rgt, and depth values for nested set SpudPostCategory.where(:parent_id => 0).update_all({:parent_id => nil}) SpudPostCategory.rebuild! end def down change_table :spud_post_categories do |t| t.remove :ltf t.remove :rgt t.remove :depth end end end
Version data entries
9 entries across 9 versions & 1 rubygems