You are here

function notify_update_7002 in Notify 7

Add notify_unpublished_queue table. Drop notify_unpublished_comments_queue table.

File

./notify.install, line 235
Install, update and uninstall functions for the notify module.

Code

function notify_update_7002() {
  $schema['notify_unpublished_queue'] = array(
    'description' => 'Stores list of unpublished contents to determine what content have been published since last notification.',
    'fields' => array(
      'id' => array(
        'description' => 'primary key',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'cid' => array(
        'description' => 'The {comment}.cid of the unpublished comment, or 0 if it is a node.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'description' => 'The {node}.nid of the uinpublished node, or {node}.nid to the node which the comment is a reply.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  db_create_table('notify_unpublished_queue', $schema['notify_unpublished_queue']);
  db_drop_table('notify_unpublished_comments_queue');
}