function notifications_update_3 in Notifications 6
Same name and namespace in other branches
- 5 notifications.install \notifications_update_3()
- 6.4 notifications.install \notifications_update_3()
- 6.2 notifications.install \notifications_update_3()
- 6.3 notifications.install \notifications_update_3()
- Added status and module fields
File
- ./
notifications.install, line 131
Code
function notifications_update_3() {
$ret[] = update_sql("ALTER TABLE {notifications} ADD COLUMN `module` VARCHAR(255) AFTER `cron`;");
$ret[] = update_sql("ALTER TABLE {notifications} ADD COLUMN `status` INT NOT NULL DEFAULT 1 AFTER `module`;");
$ret[] = update_sql("ALTER TABLE {notifications_queue} ADD COLUMN `module` VARCHAR(255);");
// Set default module to 'notifications'
$ret[] = update_sql("UPDATE {notifications} SET module = 'notifications'");
$ret[] = update_sql("UPDATE {notifications_queue} SET module = 'notifications'");
return $ret;
}