#
# Copyright (C) 2016 - 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 PopulateScoresTable < ActiveRecord::Migration[4.2]
  tag :predeploy

  def up
    DataFixup::PopulateScoresTable.run
  end

  def self.down
    raise ActiveRecord::IrreversibleMigration
  end
end

#
# Copyright (C) 2016 - 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 PopulateScoresTable < ActiveRecord::Migration[4.2]
  tag :postdeploy

  def up
    DataFixup::PopulateScoresTable.run
  end

  def self.down
    raise ActiveRecord::IrreversibleMigration
  end
end

Make old migration a post_deploy
Make old migration a post_deploy

Refs CORE-1170
Refs gh-1260

Test plan:

- Check out a copy of canvas from early 2016
- Create assignments with due dates
- Enroll some students and complete the assignments
- Update canvas to latest master
- Check that migrations run without error

Change-Id: If59a6b1eddbf975cb99b54b6c4475b7a256fae3e
Reviewed-on: https://gerrit.instructure.com/145096
Tested-by: Jenkins
Reviewed-by: Rob Orton <7e09c9d3e96378bf549fc283fd6e1e5b7014cc33@instructure.com>
Product-Review: Rob Orton <7e09c9d3e96378bf549fc283fd6e1e5b7014cc33@instructure.com>
QA-Review: Rob Orton <7e09c9d3e96378bf549fc283fd6e1e5b7014cc33@instructure.com>
