notifications are now system level instead of user level. To clarify the use events/notifications/email: * eventlog - everything that is happenning on server * notifications - specific important events (alerts) * email - these are really urgent things that require immediate attention. this is for the case where an admin does not visit the dashboard often. can also be alerts like bad backup config or reboot required which are not events per-se. Notes on notifications * oom - notification only * appUpdated - notification only * cert renewal failure - only raise when < 10 days to go. also send email thereafter (todo). * Backup failure - only if last 5 backups failed (todo). * Box update - notification only. we anyway send newsletter. * box update available - we raise a notification. no email. * app update available - we already have update indicator on dashboard. so, no notification or email. Alerts: * backup config * disk space * mail status * reboot * box updated * ubuntu update required
14 lines
419 B
JavaScript
14 lines
419 B
JavaScript
'use strict';
|
|
|
|
exports.up = function(db, callback) {
|
|
db.runSql('ALTER TABLE notifications DROP COLUMN userId', function (error) {
|
|
if (error) return callback(error);
|
|
|
|
db.runSql('DELETE FROM notifications', callback); // just clear notifications table
|
|
});
|
|
};
|
|
|
|
exports.down = function(db, callback) {
|
|
db.runSql('ALTER TABLE notifications ADD COLUMN userId VARCHAR(128) NOT NULL', callback);
|
|
};
|