#
# 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 AddRootAccountIdToLtiLineItems < ActiveRecord::Migration[5.2]
  tag :predeploy

  def change
    add_column :lti_line_items, :root_account_id, :integer, limit: 8
    add_foreign_key :lti_line_items, :accounts, column: :root_account_id
  end
end

Add root_account_id to Lti::LineItems table
Add root_account_id to Lti::LineItems table

closes PLAT-5481
flag=none

Test plan
- n/a

Change-Id: I0be294ede5e44d91c8d2edc29728df115fa04ced
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229399
Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com>
Reviewed-by: Weston Dransfield <e9203059795dc94e28a8831c65eb7869e818825e@instructure.com>
Reviewed-by: Rob Orton <7e09c9d3e96378bf549fc283fd6e1e5b7014cc33@instructure.com>
QA-Review: Mysti Lilla <431d062aff1e8f25416b3a7b732fe6effdb03f9a@instructure.com>
Product-Review: Mysti Lilla <431d062aff1e8f25416b3a7b732fe6effdb03f9a@instructure.com>
