You are here

function notifications_update_3 in Notifications 6.2

Same name and namespace in other branches
  1. 5 notifications.install \notifications_update_3()
  2. 6.4 notifications.install \notifications_update_3()
  3. 6 notifications.install \notifications_update_3()
  4. 6.3 notifications.install \notifications_update_3()
  • Added status and module fields

File

./notifications.install, line 266

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;
}