20160415062917_create_personal_access_tokens.rb 448 Bytes
Newer Older
1
# rubocop:disable Migration/Timestamps
2
class CreatePersonalAccessTokens < ActiveRecord::Migration[4.2]
3 4 5
  def change
    create_table :personal_access_tokens do |t|
      t.references :user, index: true, foreign_key: true, null: false
Timothy Andrew's avatar
Timothy Andrew committed
6
      t.string :token, index: { unique: true }, null: false
7
      t.string :name, null: false
8 9
      t.boolean :revoked, default: false
      t.datetime :expires_at
10 11 12 13 14

      t.timestamps null: false
    end
  end
end