debian-mirror-gitlab/db/migrate/20201127141433_add_other_role_to_user_details.rb
2021-02-22 17:27:13 +05:30

26 lines
509 B
Ruby

# frozen_string_literal: true
class AddOtherRoleToUserDetails < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
unless column_exists?(:user_details, :other_role)
with_lock_retries do
add_column :user_details, :other_role, :text
end
end
add_text_limit :user_details, :other_role, 100
end
def down
with_lock_retries do
remove_column :user_details, :other_role
end
end
end