20140121075418_create_user_credentials.rb 373 B

123456789101112
  1. class CreateUserCredentials < ActiveRecord::Migration
  2. def change
  3. create_table :user_credentials do |t|
  4. t.integer :user_id, :null => false
  5. t.string :credential_name, :null => false
  6. t.text :credential_value, :null => false
  7. t.timestamps
  8. end
  9. add_index :user_credentials, [:user_id, :credential_name], :unique => true
  10. end
  11. end