summaryrefslogtreecommitdiff
path: root/db/migrate/20140403155022_create_sessions.rb
blob: f667f1e444c78737f7a5fb51de64be36007e8044 (plain)
1
2
3
4
5
6
7
8
9
10
11
class CreateSessions < ActiveRecord::Migration
  def change
    create_table :sessions do |t|
      t.references :user, index: true
      t.string :token

      t.timestamps
    end
    add_index :sessions, :token, unique: true
  end
end