Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20210720083432_change_application_setting_terms_not_null.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 76dbbe68967fe3410e6af18c80bbb1868ea48b35 (plain)
1
2
3
4
5
6
7
8
9
10
11
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