aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb b/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb
index c76bd8dde4..ee46df4067 100644
--- a/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb
+++ b/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb
@@ -5,8 +5,9 @@ class <%= class_name %> < ActiveRecord::Migration
t.column :data, :text
t.column :updated_at, :datetime
end
-
+
add_index :<%= session_table_name %>, :session_id
+ add_index :<%= session_table_name %>, :updated_at
end
def self.down