You are here

function notifications_update_2 in Notifications 5

Same name and namespace in other branches
  1. 6.4 notifications.install \notifications_update_2()
  2. 6 notifications.install \notifications_update_2()
  3. 6.2 notifications.install \notifications_update_2()
  4. 6.3 notifications.install \notifications_update_2()

Update:

  • Remove unused table and fields
  • Add conditions field for mysql4 compatibility
  • Updated variable name

File

./notifications.install, line 164

Code

function notifications_update_2() {
  $ret = array();
  $ret[] = update_sql("DROP TABLE {notifications_user}");
  $ret[] = update_sql("ALTER TABLE {notifications_queue} DROP COLUMN `name`;");
  $ret[] = update_sql("ALTER TABLE {notifications_queue} DROP COLUMN `field`;");
  $ret[] = update_sql("ALTER TABLE {notifications_queue} DROP COLUMN `value`;");
  $ret[] = update_sql("ALTER TABLE {notifications_queue} DROP COLUMN `author`;");
  $ret[] = update_sql("ALTER TABLE {notifications_queue} ADD COLUMN `conditions` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `cron`");
  variable_set('notifications_default_auto', variable_get('notifications_autoset', 0));
  variable_del('notifications_autoset');
  return $ret;
}