2016-11-18 06:06:00 +08:00
|
|
|
class AddConversationCreatedNotification < ActiveRecord::Migration[4.2]
|
2014-09-05 04:05:49 +08:00
|
|
|
tag :predeploy
|
|
|
|
|
|
|
|
def self.up
|
|
|
|
return unless Shard.current == Shard.default
|
|
|
|
Canvas::MessageHelper.create_notification({
|
|
|
|
name: 'Conversation Created',
|
|
|
|
delay_for: 0,
|
|
|
|
category: 'Conversation Created'
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
return unless Shard.current == Shard.default
|
2014-09-27 21:46:36 +08:00
|
|
|
Notification.where(name: 'Conversation Created').delete_all
|
2014-09-05 04:05:49 +08:00
|
|
|
end
|
2016-11-18 06:06:00 +08:00
|
|
|
end
|