cirandas.net

ref: master

db/migrate/009_create_friendships.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class CreateFriendships < ActiveRecord::Migration
  def self.up
    create_table :friendships do |t|
      t.column :person_id,     :integer
      t.column :friend_id,     :integer
      t.column :created_at,    :datetime
    end
  end

  def self.down
    drop_table :friendships
  end
end