summaryrefslogtreecommitdiff
path: root/db/migrate/20200311214912_add_modsecurity_mode_to_ingress_application.rb
blob: 7f3366a4900da052a15e2327b2f2ac51078bd9a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class AddModsecurityModeToIngressApplication < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers
  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_column_with_default(:clusters_applications_ingress, :modsecurity_mode, :smallint, default: 0, allow_null: false) # rubocop:disable Migration/AddColumnWithDefault
  end

  def down
    remove_column :clusters_applications_ingress, :modsecurity_mode
  end
end