diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2012-04-23 23:22:19 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-04-23 23:22:19 -0300 |
commit | bad1954caba469166a15e534e82bf7739f932fe7 (patch) | |
tree | 8958c603e9f192cd16bca89cf82dee3e9a1e88b6 /reminder.install | |
parent | 2ae78852244f12c9ac9014eccd651534c5f72b76 (diff) | |
download | reminder-bad1954caba469166a15e534e82bf7739f932fe7.tar.gz reminder-bad1954caba469166a15e534e82bf7739f932fe7.tar.bz2 |
Start refactoring
Diffstat (limited to 'reminder.install')
-rw-r--r-- | reminder.install | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/reminder.install b/reminder.install index d958832..38de02f 100644 --- a/reminder.install +++ b/reminder.install @@ -127,5 +127,43 @@ function reminder_schema() { 'primary key' => array('log_id'), ); + $schema['reminder_notifications'] = array( + 'description' => 'The table of sent notifications.', + 'fields' => array( + 'id' => array( + 'type' => 'serial', + 'unsigned' => TRUE, + 'not null' => TRUE + ), + 'reminder_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'unsigned' => TRUE, + 'default' => 0 + ), + 'last' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '0' + ), + ), + + 'primary key' => array('id'), + ); + return $schema; } + +/** + * Adds notification table. + */ +function reminder_update_7000(&$sandbox) { + // Make sure to not run this update twice. + if (db_table_exists('reminder_notifications')) { + return; + } + + $schema = reminder_schema(); + db_create_table('reminder_notifications', $schema['reminder_notifications']); +} |