fix notifications migrations
notifications are unsharded, so the data only applies to the default shard Change-Id: I742e39c0ae131bc8ce37358285ae35a71e9d928f Reviewed-on: https://gerrit.instructure.com/23610 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jacob Fugal <jacob@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
718e629dd7
commit
3e39d030f1
|
@ -2,11 +2,13 @@ class MoveMigrationNotificationsToSeparateCategory < ActiveRecord::Migration
|
|||
tag :postdeploy
|
||||
|
||||
def self.up
|
||||
return unless Shard.current == Shard.default
|
||||
Notification.where(:name => ['Migration Export Ready', 'Migration Import Finished', 'Migration Import Failed']).
|
||||
update_all(:category => 'Migration')
|
||||
end
|
||||
|
||||
def self.down
|
||||
return unless Shard.current == Shard.default
|
||||
Notification.where(:name => ['Migration Export Ready', 'Migration Import Finished', 'Migration Import Failed']).
|
||||
update_all(:category => 'Other')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue