function ad_notify_schema in Advertisement 6
Implementation of hook_schema().
File
- notify/
ad_notify.install, line 14 - Ad_notify module database schema.
Code
function ad_notify_schema() {
$schema['ad_notify'] = array(
'description' => 'The ad_notify table stores notifications data such as recepient, message body, event, etc.',
'fields' => array(
'notid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'aid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'oid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'event' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'delay' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'queued' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'sent' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'counter' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'locked' => array(
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'expire' => array(
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'address' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'subject' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'body' => array(
'type' => 'text',
'not null' => FALSE,
),
),
'primary key' => array(
'notid',
),
'unique keys' => array(
'oid' => array(
'oid',
'event',
'delay',
),
),
'indexes' => array(
'delay' => array(
'delay',
),
'event' => array(
'event',
),
'oid_2' => array(
'oid',
),
'queued' => array(
'queued',
),
'sent' => array(
'sent',
),
'status' => array(
'status',
),
),
);
return $schema;
}