debian-mirror-gitlab/db/migrate/20160415062917_create_personal_access_tokens.rb
2019-02-15 15:39:39 +05:30

14 lines
448 B
Ruby

# rubocop:disable Migration/Timestamps
class CreatePersonalAccessTokens < ActiveRecord::Migration[4.2]
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