class CreateFriendingsTable

Public Class Methods

down() click to toggle source
# File lib/generators/social_engine/install/templates/create_friendings_table.rb, line 15
def self.down
  remove_index :friendings, :friendor_id
  remove_index :friendings, :friendee_id
  drop_table :friendings
end
up() click to toggle source
# File lib/generators/social_engine/install/templates/create_friendings_table.rb, line 2
def self.up
  create_table :friendings, :force => true do |t|
    t.integer :friendor_id
    t.integer :friendee_id
    t.boolean :confirmed, :default => false
    t.boolean :rejected, :default => false
    t.timestamps
  end
  
  add_index :friendings, :friendor_id
  add_index :friendings, :friendee_id
end