Skip to content

Instantly share code, notes, and snippets.

@yosssi
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save yosssi/d43a11d492f8144c2881 to your computer and use it in GitHub Desktop.

Select an option

Save yosssi/d43a11d492f8144c2881 to your computer and use it in GitHub Desktop.
migration
class CreateFbConnections < ActiveRecord::Migration
def self.up
create_table :fb_connections do |t|
t.references :user
t.string :uid
t.string :access_token
t.timestamps
end
add_index :fb_connections, [:user_id]
add_index :fb_connections, [:uid]
end
def self.down
drop_table :fb_connections
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment