提交 6204a52f 编写于 作者: J Jeremy Kemper

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
上级 1b32a305
*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]
......
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册