123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php
- /**
- * @file
- * Creates the table with mail, count of emails sent and tid fields.
- */
- /**
- * Implements hook_schema().
- */
- function mandrill_simplenews_report_schema() {
- $schema['mandrill_simplenews_report_newsletter_report'] = array(
- 'fields' => array(
- 'id' => array(
- 'type' => 'serial',
- 'not null' => TRUE,
- ),
- 'report_id' => array(
- 'type' => 'varchar',
- 'length' => 32,
- 'not null'=> TRUE,
- ),
- 'tid' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- 'created' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- ),
- 'primary key' => array('id'),
- 'mysql_engine' => 'MyISAM',
- );
- $schema['mandrill_simplenews_report_newsletter_sent'] = array(
- 'fields' => array(
- 'id' => array(
- 'type' => 'serial',
- 'not null' => TRUE,
- ),
- 'sent_timestamp' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- 'sent_to_mail' => array(
- 'type' => 'varchar',
- 'length' => 254,
- 'not null'=> TRUE,
- ),
- 'from_mail' => array(
- 'type' => 'varchar',
- 'length' => 254,
- 'not null' => TRUE,
- ),
- 'subject' => array(
- 'type' => 'varchar',
- 'length' => 255,
- 'not null' => TRUE,
- ),
- 'tid' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- 'open_count' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- 'click_count' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- ),
- 'primary key' => array('id'),
- 'indexes' => array(
- 'sent_timestamp' => array('sent_timestamp'),
- 'sent_to_mail' => array('sent_to_mail'),
- 'from_mail' => array('from_mail'),
- ),
- 'mysql_engine' => 'MyISAM',
- );
- $schema['mandrill_simplenews_report_subscription_extra'] = array(
- 'fields' => array(
- 'snid' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- 'tid' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- 'last_interaction' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- ),
- 'indexes' => array(
- 'snid' => array('snid'),
- 'tid' => array('tid'),
- ),
- );
- return $schema;
- }
|