aboutsummaryrefslogtreecommitdiff
path: root/reminder.install
diff options
context:
space:
mode:
Diffstat (limited to 'reminder.install')
-rw-r--r--reminder.install131
1 files changed, 131 insertions, 0 deletions
diff --git a/reminder.install b/reminder.install
new file mode 100644
index 0000000..d958832
--- /dev/null
+++ b/reminder.install
@@ -0,0 +1,131 @@
+<?php
+
+/**
+ * @file
+ *
+ * Reminder installation callbacks.
+ */
+
+/**
+ * Implements hook_schema()
+ */
+function reminder_schema() {
+ $schema['reminder'] = array(
+ 'description' => 'The main informations of the reminders.',
+ 'fields' => array(
+ 'nid' => array(
+ 'description' => 'The contact with the base node.',
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE
+ ),
+ 'uid' => array(
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0
+ ),
+ 'anonym_name' => array(
+ 'type' => 'varchar',
+ 'length' => 100,
+ 'default' => ''
+ ),
+ 'anonym_email' => array(
+ 'type' => 'varchar',
+ 'length' => 100,
+ 'default' => ''
+ ),
+ 'until' => array(
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => '0'
+ ),
+ 'interval' => array(
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => '0'
+ ),
+ 'url' => array(
+ 'type' => 'varchar',
+ 'length' => 10,
+ 'not null' => TRUE,
+ 'default' => ''
+ ),
+ 'admin_url' => array(
+ 'type' => 'varchar',
+ 'length' => 25,
+ 'not null' => TRUE,
+ 'default' => ''
+ ),
+ 'secure' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => '0'
+ ),
+ ),
+ 'primary key' => array('nid'),
+ );
+
+ $schema['reminder_subscriptions'] = array(
+ 'description' => 'The table of subscribed users.',
+ 'fields' => array(
+ 'id' => array(
+ 'type' => 'serial',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE
+ ),
+ 'email' => array(
+ 'type' => 'varchar',
+ 'length' => 100,
+ 'default' => ''
+ ),
+ 'reminder_id' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0
+ ),
+ 'unsubscribe_url' => array(
+ 'type' => 'varchar',
+ 'length' => 25,
+ 'not null' => TRUE,
+ 'default' => ''
+ ),
+ ),
+
+ 'primary key' => array('id'),
+ );
+
+ $schema['reminder_logs'] = array(
+ 'description' => 'Log table.',
+ 'fields' => array(
+ 'log_id' => array(
+ 'type' => 'serial',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE
+ ),
+ 'nid' => array(
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0
+ ),
+ 'username' => array(
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => ''
+ ),
+ 'dt' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ ),
+ ),
+
+ 'primary key' => array('log_id'),
+ );
+
+ return $schema;
+}