Class: DeviseSessionableCreateSessions
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- DeviseSessionableCreateSessions
- Defined in:
- lib/generators/devise_sessionable/install/templates/migration.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/devise_sessionable/install/templates/migration.rb', line 2 def change create_table :devise_sessionable_sessions, id: :uuid do |t| t.string :authentication_token t.uuid :authable_id, null: false t.string :authable_type, null: false t. end add_index :devise_sessionable_sessions, [:authable_id, :authable_type], name: 'index_devise_sessionable_sessions_on_authable' add_index :devise_sessionable_sessions, :authentication_token end |