Add migration to create session table in the database.
This commit is contained in:
parent
7f92d533d0
commit
87a673e74c
1 changed files with 15 additions and 0 deletions
15
db/migrate/003_sql_session_store_setup.rb
Normal file
15
db/migrate/003_sql_session_store_setup.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class SqlSessionStoreSetup < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table "sessions", :options => "ENGINE=InnoDB" do |t|
|
||||
t.column "session_id", :string
|
||||
t.column "data", :text
|
||||
t.column "created_at", :timestamp
|
||||
t.column "updated_at", :timestamp
|
||||
end
|
||||
add_index "sessions", ["session_id"], :name => "sessions_session_id_idx", :unique => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table "sessions"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue