Sha256: fbf610e35085969b639c20dbd94691e64d44063d42ceb8373cd117419baf0c76

Contents?: true

Size: 398 Bytes

Versions: 44

Compression:

Stored size: 398 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def self.up
    create_table :<%= session_table_name %> do |t|
      t.string :session_id, :null => false
      t.text :data
      t.timestamps
    end

    add_index :<%= session_table_name %>, :session_id
    add_index :<%= session_table_name %>, :updated_at
  end

  def self.down
    drop_table :<%= session_table_name %>
  end
end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
activerecord-3.0.20 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.19 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.18 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.17 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.16 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.15 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.14 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.13 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.13.rc1 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.12 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.12.rc1 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.11 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.10 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.10.rc1 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.9 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.9.rc5 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.9.rc4 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.9.rc3 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.9.rc1 lib/rails/generators/active_record/session_migration/templates/migration.rb
activerecord-3.0.8 lib/rails/generators/active_record/session_migration/templates/migration.rb