20140515211100_create_services.rb 493 B

123456789101112131415161718
  1. class CreateServices < ActiveRecord::Migration
  2. def change
  3. create_table :services do |t|
  4. t.integer :user_id, null: false
  5. t.string :provider, null: false
  6. t.string :name, null: false
  7. t.text :token, null: false
  8. t.text :secret
  9. t.text :refresh_token
  10. t.datetime :expires_at
  11. t.boolean :global, default: false
  12. t.text :options
  13. t.timestamps
  14. end
  15. add_index :services, :user_id
  16. add_index :services, [:user_id, :global]
  17. end
  18. end