function ad_actions_schema in Advertisement 6.2
Same name and namespace in other branches
- 6.3 actions/ad_actions.install \ad_actions_schema()
- 7 actions/ad_actions.install \ad_actions_schema()
Implementation of hook_schema().
File
- actions/
ad_actions.install, line 14 - Ad_actions module database schema.
Code
function ad_actions_schema() {
$schema['ad_actions_queue'] = array(
'description' => 'The ad_notify table stores notifications data such as recepient, message body, event, etc.',
'fields' => array(
'qid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'aid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'recipient' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'scheduled' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'period' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'sent' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'context' => array(
'type' => 'text',
'not null' => FALSE,
),
),
'primary key' => array(
'qid',
),
'unique keys' => array(
'aid_period_recipient' => array(
'aid',
'period',
'recipient',
),
),
'indexes' => array(
'period_scheduled' => array(
'period',
'scheduled',
),
'sent_period' => array(
'sent',
'period',
),
),
);
return $schema;
}