You are here

function auto_expire_schema in Auto Expire 7

Implements hook_schema().

File

./auto_expire.install, line 14
Install, update and uninstall functions for the Auto Expire module.

Code

function auto_expire_schema() {
  $schema['auto_expire'] = array(
    'description' => 'Auto expire module: track node expirations',
    'fields' => array(
      'nid' => array(
        'description' => 'node id: primary key',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'warned' => array(
        'description' => 'warned flag: whether email has been sent out',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'expire' => array(
        'description' => 'expire date: Unix timestamp',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'extended' => array(
        'description' => 'number of times the node expiry has been extended',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}