From bbe511b231b5de3fab4dc418601c89cc1ccc8063 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 27 Jul 2021 22:40:43 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-1-stable-ee --- ...210720083432_change_application_setting_terms_not_null.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrate/20210720083432_change_application_setting_terms_not_null.rb (limited to 'db/migrate') diff --git a/db/migrate/20210720083432_change_application_setting_terms_not_null.rb b/db/migrate/20210720083432_change_application_setting_terms_not_null.rb new file mode 100644 index 00000000000..76dbbe68967 --- /dev/null +++ b/db/migrate/20210720083432_change_application_setting_terms_not_null.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class ChangeApplicationSettingTermsNotNull < ActiveRecord::Migration[6.1] + def up + execute("UPDATE application_setting_terms SET terms = '' WHERE terms IS NULL") + change_column_null :application_setting_terms, :terms, false + end + + def down + change_column_null :application_setting_terms, :terms, true + end +end -- cgit v1.2.1