You are here

function notifications_update_6005 in Notifications 6.4

Same name and namespace in other branches
  1. 6.3 notifications.install \notifications_update_6005()

Migrate to messaging_destination mdid

Split into multiple updates so individual batch steps are smaller

File

./notifications.install, line 416

Code

function notifications_update_6005() {
  $ret = array();

  // Add fields to tables, allow null till it's populated
  $field_mdid = array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => FALSE,
  );
  db_add_field($ret, 'notifications', 'mdid', $field_mdid);
  db_add_field($ret, 'notifications_queue', 'mdid', $field_mdid);
  db_add_field($ret, 'notifications_sent', 'mdid', $field_mdid);
  db_drop_primary_key($ret, 'notifications_sent');
  return $ret;
}