diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-05-29 13:43:07 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-05-30 10:47:57 -0300 |
commit | a1a0f8e6b017f57060bc94d14fd4d37d8756e47d (patch) | |
tree | 46f1eab56183e4e285d33795102c0e51a3967b9a /db/migrate | |
parent | a9bcddee4c2653cbf2254d893299393e3778e7df (diff) | |
download | gitlab-ce-a1a0f8e6b017f57060bc94d14fd4d37d8756e47d.tar.gz |
Add DNS rebinding protection settings
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20190529142545_add_dns_rebinding_protection_enabled_to_application_settings.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20190529142545_add_dns_rebinding_protection_enabled_to_application_settings.rb b/db/migrate/20190529142545_add_dns_rebinding_protection_enabled_to_application_settings.rb new file mode 100644 index 00000000000..8835dc8b7ba --- /dev/null +++ b/db/migrate/20190529142545_add_dns_rebinding_protection_enabled_to_application_settings.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddDnsRebindingProtectionEnabledToApplicationSettings < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:application_settings, :dns_rebinding_protection_enabled, + :boolean, + default: true, + allow_null: false) + end + + def down + remove_column(:application_settings, :dns_rebinding_protection_enabled) + end +end |