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

Version Path
radiant-reader-extension-3.0.15 db/migrate/20110812111934_groups_nested_set.rb
radiant-reader-extension-3.0.14 db/migrate/20110812111934_groups_nested_set.rb
radiant-reader-extension-3.0.13 db/migrate/20110812111934_groups_nested_set.rb
radiant-reader-extension-3.0.11 db/migrate/20110812111934_groups_nested_set.rb
radiant-reader-extension-3.0.10 db/migrate/20110812111934_groups_nested_set.rb
radiant-reader-extension-3.0.9 db/migrate/20110812111934_groups_nested_set.rb
radiant-reader-extension-3.0.8 db/migrate/20110812111934_groups_nested_set.rb
radiant-reader-extension-3.0.7 db/migrate/20110812111934_groups_nested_set.rb