20180503193953_add_mirror_available_to_application_settings.rb 506 Bytes
Newer Older
1
class AddMirrorAvailableToApplicationSettings < ActiveRecord::Migration[4.2]
2 3 4 5 6 7 8 9 10 11 12 13 14 15
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_column_with_default(:application_settings, :mirror_available, :boolean, default: true, allow_null: false) unless column_exists?(:application_settings, :mirror_available)
  end

  def down
    remove_column(:application_settings, :mirror_available) if column_exists?(:application_settings, :mirror_available)
  end
end