canvas-lms/db/migrate/20140904193057_add_conversa...

17 lines
611 B
Ruby

class AddConversationCreatedNotification < ActiveRecord::Migration
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
Notification.where(name: 'Conversation Created').delete_all
end
end