mirror of
https://github.com/github/rails.git
synced 2026-01-30 16:58:15 -05:00
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:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user