ad_notify.install in Advertisement 6
Same filename and directory in other branches
Ad_notify module database schema.
Copyright (c) 2005-2009. Jeremy Andrews <jeremy@tag1consulting.com>.
File
notify/ad_notify.installView source
<?php
/**
* @file
* Ad_notify module database schema.
*
* Copyright (c) 2005-2009.
* Jeremy Andrews <jeremy@tag1consulting.com>.
*/
/**
* Implementation of hook_schema().
*/
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;
}
/**
* ad_notify module installation.
*/
function ad_notify_install() {
drupal_install_schema('ad_notify');
}
/**
* Allow complete uninstallation of the ad_notify module.
*/
function ad_notify_uninstall() {
// Remove tables.
drupal_uninstall_schema('ad_notify');
}
Functions
Name![]() |
Description |
---|---|
ad_notify_install | ad_notify module installation. |
ad_notify_schema | Implementation of hook_schema(). |
ad_notify_uninstall | Allow complete uninstallation of the ad_notify module. |