aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate/002_add_sessions.rb
blob: 22b4a00651b6e57f8a9427bcb925fd5f3b42eee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class AddSessions < ActiveRecord::Migration
  def self.up
    create_table :sessions do |t|
      t.column :session_id, :string
      t.column :data, :text
      t.column :updated_at, :datetime
    end

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

  def self.down
    drop_table :sessions
  end
end