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
This commit is contained in:
Jeremy Kemper
2007-06-05 02:42:57 +00:00
parent 1b32a305df
commit 6204a52fac
2 changed files with 5 additions and 3 deletions

View File

@@ -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 File

@@ -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