Sha256: 219ebce09c8bf9ec8795364c598efc6d046b7f2655425d59d671e009b5140b32
Contents?: true
Size: 509 Bytes
Versions: 28
Compression:
Stored size: 509 Bytes
Contents
class GroupsNestedSet < ActiveRecord::Migration def self.up add_column :groups, :parent_id, :integer add_column :groups, :root_group_id, :integer add_column :groups, :lft, :integer add_column :groups, :rgt, :integer # Group.reset_column_information # Group.rebuild! # Group.all.each {|g| g.save } end def self.down remove_column :groups, :parent_id remove_column :groups, :root_group_id remove_column :groups, :lft remove_column :groups, :rgt end end
Version data entries
28 entries across 28 versions & 1 rubygems