2016-04-15 03:36:44 -04: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 00:20:14 -04:00
|
|
|
t.string :token, index: { unique: true }, null: false
|
2016-04-15 03:36:44 -04:00
|
|
|
t.string :name, null: false
|
2016-04-22 03:06:56 -04:00
|
|
|
t.boolean :revoked, default: false
|
|
|
|
t.datetime :expires_at
|
2016-04-15 03:36:44 -04:00
|
|
|
|
|
|
|
t.timestamps null: false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|