mark the anonymous_instructor_annotations field as not nullable
closes GRADE-239 test plan: * Run migrations * Verify the column is marked not nullable in db/structure.sql Change-Id: Ib7256d66b764531aec24bbbcac44cdbcbae66ded Reviewed-on: https://gerrit.instructure.com/130119 Reviewed-by: Neil Gupta <ngupta@instructure.com> Reviewed-by: Spencer Olson <solson@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Jenkins QA-Review: Spencer Olson <solson@instructure.com> Product-Review: Keith T. Garner <kgarner@instructure.com>
This commit is contained in:
parent
06d54522b2
commit
48532a4235
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# Copyright (C) 2017 - 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 MarkAssignmentAnonymousInstructorAnnotationsNotNullable < ActiveRecord::Migration[5.0]
|
||||
tag :postdeploy
|
||||
|
||||
def up
|
||||
# In case we missed something in 20170824064214_backfill_assignment_anonymous_instructor_annotations.rb
|
||||
DataFixup::BackfillNulls.run(Assignment, :anonymous_instructor_annotations, default_value: false)
|
||||
|
||||
change_column_null :assignments, :anonymous_instructor_annotations, false
|
||||
end
|
||||
|
||||
def down
|
||||
change_column_null :assignments, :anonymous_instructor_annotations, true
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue