aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate/002_add_sessions.rb
blob: 57132168310ee590d7100c0bf92520e1adaaa9c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- encoding : utf-8 -*-
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