You are here

function node_expire_schema in Node expire 6

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

Implementation of hook_schema().

File

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

Code

function node_expire_schema() {
  $schema['node_expire'] = array(
    'description' => t('Alerts administrators of possibly outdated materials, and optionally unpublishes them.'),
    'fields' => array(
      'nid' => array(
        'description' => t('Node ID from {node}.nid.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'expire' => array(
        'type' => 'int',
        'default' => 0,
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'expire_timefrom' => array(
        'type' => 'int',
        'size' => 'small',
        'default' => 0,
        'not null' => TRUE,
      ),
      'expiremode' => array(
        'type' => 'varchar',
        'length' => 10,
        'not null' => TRUE,
      ),
      'isroot' => array(
        'type' => 'int',
        'size' => 'tiny',
        'default' => 0,
        'not null' => TRUE,
      ),
      'lastnotify' => array(
        'type' => 'int',
        'default' => 0,
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
    'indexes' => array(
      'expire' => array(
        'expire',
      ),
      'expiremode' => array(
        'expiremode',
      ),
      'lastnotify' => array(
        'lastnotify',
      ),
    ),
  );
  return $schema;
}