diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-05-28 21:59:54 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-05-28 21:59:54 +0530 |
commit | 995ea00328932ebb568ce925bb84e84ca98b489b (patch) | |
tree | fb27ea7e348a526232398cb98b908ad6c4508aa4 /activerecord/lib/rails | |
parent | 2fd7ea97ecfd40ee23e0f75ee0ed9a4febcbdb15 (diff) | |
download | rails-995ea00328932ebb568ce925bb84e84ca98b489b.tar.gz rails-995ea00328932ebb568ce925bb84e84ca98b489b.tar.bz2 rails-995ea00328932ebb568ce925bb84e84ca98b489b.zip |
Use change in place of up and down in sessions table migration
Diffstat (limited to 'activerecord/lib/rails')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb b/activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb index 8f0bf1ef0d..9ea3248513 100644 --- a/activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb +++ b/activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb @@ -1,5 +1,5 @@ class <%= migration_class_name %> < ActiveRecord::Migration - def up + def change create_table :<%= session_table_name %> do |t| t.string :session_id, :null => false t.text :data @@ -9,8 +9,4 @@ class <%= migration_class_name %> < ActiveRecord::Migration add_index :<%= session_table_name %>, :session_id add_index :<%= session_table_name %>, :updated_at end - - def down - drop_table :<%= session_table_name %> - end end |