diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2012-03-23 11:28:11 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-03-23 11:28:11 -0300 |
commit | ed4695652dbc6e60e0b5d67b9eff433b707a8cca (patch) | |
tree | b132b0ac63d3c4986f68b642c90e4e3998f44bcc /reminder.install | |
download | reminder-ed4695652dbc6e60e0b5d67b9eff433b707a8cca.tar.gz reminder-ed4695652dbc6e60e0b5d67b9eff433b707a8cca.tar.bz2 |
Initial import
Diffstat (limited to 'reminder.install')
-rw-r--r-- | reminder.install | 131 |
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; +} |