pierre@0: . pierre@0: */ pierre@0: pierre@0: /** pierre@0: * Implementation of hook_schema(). pierre@0: */ pierre@0: function ad_notify_schema() { pierre@0: $schema['ad_notify'] = array( pierre@0: 'description' => 'The ad_notify table stores notifications data such as recepient, message body, event, etc.', pierre@0: 'fields' => array( pierre@0: 'notid' => array( pierre@0: 'type' => 'serial', pierre@0: 'unsigned' => TRUE, pierre@0: 'not null' => TRUE, pierre@0: ), pierre@0: 'aid' => array( pierre@0: 'type' => 'int', pierre@0: 'unsigned' => TRUE, pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'oid' => array( pierre@0: 'type' => 'int', pierre@0: 'unsigned' => TRUE, pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'event' => array( pierre@0: 'type' => 'varchar', pierre@0: 'length' => '255', pierre@0: 'not null' => TRUE, pierre@0: 'default' => '' pierre@0: ), pierre@0: 'delay' => array( pierre@0: 'type' => 'int', pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'queued' => array( pierre@0: 'type' => 'int', pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'sent' => array( pierre@0: 'type' => 'int', pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'counter' => array( pierre@0: 'type' => 'int', pierre@0: 'unsigned' => TRUE, pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'locked' => array( pierre@0: 'type' => 'int', pierre@0: 'unsigned' => TRUE, pierre@0: 'size' => 'tiny', pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'expire' => array( pierre@0: 'type' => 'int', pierre@0: 'unsigned' => TRUE, pierre@0: 'size' => 'tiny', pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'status' => array( pierre@0: 'type' => 'int', pierre@0: 'unsigned' => TRUE, pierre@0: 'size' => 'tiny', pierre@0: 'not null' => TRUE, pierre@0: 'default' => 0, pierre@0: ), pierre@0: 'address' => array( pierre@0: 'type' => 'varchar', pierre@0: 'length' => '255', pierre@0: 'not null' => TRUE, pierre@0: 'default' => '', pierre@0: ), pierre@0: 'subject' => array( pierre@0: 'type' => 'varchar', pierre@0: 'length' => '255', pierre@0: 'not null' => TRUE, pierre@0: 'default' => '', pierre@0: ), pierre@0: 'body' => array( pierre@0: 'type' => 'text', pierre@0: 'not null' => FALSE, pierre@0: ), pierre@0: ), pierre@0: 'primary key' => array('notid'), pierre@0: 'unique keys' => array( pierre@0: 'oid' => array('oid', 'event', 'delay'), pierre@0: ), pierre@0: 'indexes' => array( pierre@0: 'delay' => array('delay'), pierre@0: 'event' => array('event'), pierre@0: 'oid_2' => array('oid'), pierre@0: 'queued' => array('queued'), pierre@0: 'sent' => array('sent'), pierre@0: 'status' => array('status'), pierre@0: ), pierre@0: ); pierre@0: pierre@0: return $schema; pierre@0: } pierre@0: pierre@0: /** pierre@0: * ad_notify module installation. pierre@0: */ pierre@0: function ad_notify_install() { pierre@0: drupal_install_schema('ad_notify'); pierre@0: } pierre@0: pierre@0: pierre@0: /** pierre@0: * Allow complete uninstallation of the ad_notify module. pierre@0: */ pierre@0: function ad_notify_uninstall() { pierre@0: // Remove tables. pierre@0: drupal_uninstall_schema('ad_notify'); pierre@0: }