# frozen_string_literal: true

#
# Copyright (C) 2022 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#

class AddSecretToSettings < ActiveRecord::Migration[6.0]
  tag :predeploy

  def change
    add_column :settings, :secret, :boolean, default: false, null: false, if_not_exists: true
  end
end

Add `secret` column to Settings
Add `secret` column to Settings

In a subsequent commit, this will allow a setting to be marked as
"secret", and its value redacted in the forthcoming Settings UI.

refs DE-1138
flag=none

test plan:
- verify the column is added, and `setting=` is successful

Change-Id: I0dfad0ea584e199828ff04fabe91964069d3e676
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/289857
Reviewed-by: Jeremy Stanley <b3f594e10a9edcf5413cf1190121d45078c62290@instructure.com>
Migration-Review: Jeremy Stanley <b3f594e10a9edcf5413cf1190121d45078c62290@instructure.com>
Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com>
QA-Review: Isaac Moore <258108225390078ef47d1319acab49ad7948abf1@instructure.com>
Product-Review: Isaac Moore <258108225390078ef47d1319acab49ad7948abf1@instructure.com>
