debian-mirror-gitlab/db/migrate/20190725183432_add_index_to_index_on_static_object_token.rb
2019-12-04 20:38:33 +05:30

22 lines
559 B
Ruby

# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class AddIndexToIndexOnStaticObjectToken < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :users, :static_object_token, unique: true
end
def down
remove_concurrent_index :users, :static_object_token
end
end