Class: CreateIdentities
- Inherits:
-
Object
- Object
- CreateIdentities
- Defined in:
- lib/generators/templates/migrations/create_identities_table.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/templates/migrations/create_identities_table.rb', line 2 def change create_table :identities do |t| ## Attributes t.string :uid, null: false t.string :provider, null: false t.string :oauth_token, null: false t.string :oauth_secret t.datetime :expires_at t. null: false ## Associations t.belongs_to :user, foreign_key: true end add_index :identities, [:provider, :uid] end |