You are here

function privatemsg_update_7002 in Privatemsg 7

Same name and namespace in other branches
  1. 7.2 privatemsg.install \privatemsg_update_7002()

Add {pm_disable} table.

File

./privatemsg.install, line 209
Install file for privatemsg.module

Code

function privatemsg_update_7002() {

  // Make sure to not run this update twice.
  if (db_table_exists('pm_disable')) {
    return;
  }
  $schema['pm_disable'] = array(
    'description' => '{pm_disable} holds the list of users that have disabled private messaging',
    'fields' => array(
      'uid' => array(
        'description' => 'ID of the user',
        'type' => 'int',
        'not null' => TRUE,
        'unsigned' => TRUE,
      ),
    ),
    'primary key' => array(
      'uid',
    ),
  );
  if (!db_table_exists('pm_disable')) {
    db_create_table('pm_disable', $schema['pm_disable']);
  }
}