Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sexy migrations for the session_migration generator. Closes #8561.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6938 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 6204a52facf97ac741f61decf773c01494245f02 1 parent 1b32a30
@jeremy jeremy authored
View
2  railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Sexy migrations for the session_migration generator. #8561 [Vladislav]
+
* Console reload! runs to_prepare callbacks also. #8393 [f.svehla]
* Generated migrations include timestamps by default. #8501 [Shane Vitarana]
View
6 railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb
@@ -1,9 +1,9 @@
class <%= class_name %> < ActiveRecord::Migration
def self.up
create_table :<%= session_table_name %> do |t|
- t.column :session_id, :string
- t.column :data, :text
- t.column :updated_at, :datetime
+ t.string :session_id, :null => false
+ t.text :data
+ t.timestamps
end
add_index :<%= session_table_name %>, :session_id
Please sign in to comment.
Something went wrong with that request. Please try again.