canvas-lms/db/migrate/20200518204847_move_auditor...

21 lines
733 B
Ruby

class MoveAuditorsToPartitions < ActiveRecord::Migration[5.2]
tag :postdeploy
def up
strand_name = "partition_auditors:#{Shard.current.database_server.id}"
DataFixup::Auditors::MigrateAuthToPartitions.send_later_if_production_enqueue_args(:run,
priority: Delayed::LOWER_PRIORITY,
strand: strand_name)
DataFixup::Auditors::MigrateCoursesToPartitions.send_later_if_production_enqueue_args(:run,
priority: Delayed::LOWER_PRIORITY,
strand: strand_name)
DataFixup::Auditors::MigrateGradeChangesToPartitions.send_later_if_production_enqueue_args(:run,
priority: Delayed::LOWER_PRIORITY,
strand: strand_name)
end
def down
raise ActiveRecord::IrreversibleMigration
end
end