summaryrefslogtreecommitdiff
path: root/db/migrate/20160415062917_create_personal_access_tokens.rb
blob: ce0b33f32bd0d07dd6550eaab095e4651f4b91ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class CreatePersonalAccessTokens < ActiveRecord::Migration
  def change
    create_table :personal_access_tokens do |t|
      t.references :user, index: true, foreign_key: true, null: false
      t.string :token, index: { unique: true }, null: false
      t.string :name, null: false
      t.boolean :revoked, default: false
      t.datetime :expires_at

      t.timestamps null: false
    end
  end
end