This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/db/migrate/013_create_friends.rb

17 lines
380 B
Ruby
Raw Normal View History

class CreateFriends < ActiveRecord::Migration
def self.up
create_table :friends do |t|
t.column :source_id, :integer
t.column :destination_id, :integer
t.column :rank, :integer
t.column :created_at, :timestamp
end
add_index :friends, :source_id
add_index :friends, :destination_id
end
def self.down
drop_table :friends
end
end