You are here

function node_expire_update_6201 in Node expire 6.2

Same name and namespace in other branches
  1. 8 node_expire.install \node_expire_update_6201()
  2. 7.2 node_expire.install \node_expire_update_6201()
  3. 7 node_expire.install \node_expire_update_6201()

Implementation of hook_update_N().

New field 'lastnotify'. Holds last notified timestamp.

File

./node_expire.install, line 89
Install, uninstall and update the module.

Code

function node_expire_update_6201() {
  $ret = array();
  if (!db_column_exists('node_expire', 'lastnotify')) {
    db_add_field($ret, 'node_expire', 'lastnotify', array(
      'type' => 'int',
      'default' => 0,
      'unsigned' => TRUE,
      'not null' => TRUE,
    ));
  }
  db_drop_index($ret, 'node_expire', 'expire_expired');
  db_add_index($ret, 'node_expire', 'expire_expired_lastnotify', array(
    'expire',
    'expired',
    'lastnotify',
  ));
  return $ret;
}