Commit c4bbd3e0 authored by Andreas Brandl's avatar Andreas Brandl

Use with_lock_retries for migration

parent 40bdd89b
# frozen_string_literal: true
class AddColumnsToNamespaceSettings < ActiveRecord::Migration[6.1]
def change
add_column :namespace_settings, :setup_for_company, :boolean
add_column :namespace_settings, :jobs_to_be_done, :smallint
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
with_lock_retries do
add_column :namespace_settings, :setup_for_company, :boolean
add_column :namespace_settings, :jobs_to_be_done, :smallint
end
end
def down
with_lock_retries do
remove_column :namespace_settings, :setup_for_company
remove_column :namespace_settings, :jobs_to_be_done
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment