20180910153412_add_token_digest_to_personal_access_tokens.rb 473 Bytes
Newer Older
1 2
# frozen_string_literal: true

3
class AddTokenDigestToPersonalAccessTokens < ActiveRecord::Migration[4.2]
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def up
    change_column :personal_access_tokens, :token, :string, null: true

    add_column :personal_access_tokens, :token_digest, :string
  end

  def down
    remove_column :personal_access_tokens, :token_digest

    change_column :personal_access_tokens, :token, :string, null: false
  end
end