Skip to content

Commit

Permalink
Add session table
Browse files Browse the repository at this point in the history
  • Loading branch information
kyanny committed Jan 20, 2010
1 parent d1e23f6 commit 72cead2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
16 changes: 16 additions & 0 deletions depot/db/migrate/20100120152145_create_sessions.rb
@@ -0,0 +1,16 @@
class CreateSessions < ActiveRecord::Migration
def self.up
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end

add_index :sessions, :session_id
add_index :sessions, :updated_at
end

def self.down
drop_table :sessions
end
end
12 changes: 11 additions & 1 deletion depot/db/schema.rb
Expand Up @@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20100119101420) do
ActiveRecord::Schema.define(:version => 20100120152145) do

create_table "products", :force => true do |t|
t.string "title"
Expand All @@ -20,4 +20,14 @@
t.decimal "price", :precision => 8, :scale => 2, :default => 0.0
end

create_table "sessions", :force => true do |t|
t.string "session_id", :null => false
t.text "data"
t.datetime "created_at"
t.datetime "updated_at"
end

add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"

end

0 comments on commit 72cead2

Please sign in to comment.