debian-mirror-gitlab/db/migrate/20200413230056_add_waf_and_cilium_logs_to_applications_fluentd.rb
2020-05-24 23:13:21 +05:30

30 lines
984 B
Ruby

# frozen_string_literal: true
class AddWafAndCiliumLogsToApplicationsFluentd < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default(:clusters_applications_fluentd, # rubocop:disable Migration/AddColumnWithDefault
:waf_log_enabled,
:boolean,
default: true,
allow_null: false)
add_column_with_default(:clusters_applications_fluentd, # rubocop:disable Migration/AddColumnWithDefault
:cilium_log_enabled,
:boolean,
default: true,
allow_null: false)
end
def down
remove_column(:clusters_applications_fluentd,
:waf_log_enabled)
remove_column(:clusters_applications_fluentd,
:cilium_log_enabled)
end
end