2017-06-13 11:44:13 +00:00
|
|
|
# rubocop:disable Migration/Timestamps
|
2016-04-15 07:36:44 +00:00
|
|
|
class CreatePersonalAccessTokens < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :personal_access_tokens do |t|
|
|
|
|
t.references :user, index: true, foreign_key: true, null: false
|
2016-06-14 04:20:14 +00:00
|
|
|
t.string :token, index: { unique: true }, null: false
|
2016-04-15 07:36:44 +00:00
|
|
|
t.string :name, null: false
|
2016-04-22 07:06:56 +00:00
|
|
|
t.boolean :revoked, default: false
|
|
|
|
t.datetime :expires_at
|
2016-04-15 07:36:44 +00:00
|
|
|
|
|
|
|
t.timestamps null: false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|