migration: AddReplicaIdentityForGroups

flag=none
refs VICE-972

TEST PLAN:
- migration works
- tests pass

Change-Id: Iaaa11fee80888b25584fce147380cdf63a3a59fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255214
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
This commit is contained in:
Caleb Guanzon 2020-12-15 11:20:25 -07:00
parent cd3815d643
commit 66e52826e7
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# frozen_string_literal: true
#
# Copyright (C) 2020 - 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 AddReplicaIdentityForGroups < ActiveRecord::Migration[5.2]
tag :postdeploy
disable_ddl_transaction!
def up
add_replica_identity 'Group', :root_account_id, 0
# no index to remove
end
def down
remove_replica_identity 'Group'
end
end