aboutsummaryrefslogtreecommitdiff
path: root/reminder.install
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-04-24 19:30:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-04-24 19:30:37 -0300
commit44b01f01b4977d4816ee1dc5c4cf4fcf322d2dec (patch)
treed5fcb01bf0051e342607e24f23a10a68bdd469c1 /reminder.install
parent3602af7832edc2c89fd227671b4a45046401b3b0 (diff)
downloadreminder-44b01f01b4977d4816ee1dc5c4cf4fcf322d2dec.tar.gz
reminder-44b01f01b4977d4816ee1dc5c4cf4fcf322d2dec.tar.bz2
More refactoring
Diffstat (limited to 'reminder.install')
-rw-r--r--reminder.install24
1 files changed, 23 insertions, 1 deletions
diff --git a/reminder.install b/reminder.install
index 38de02f..a5bbbb0 100644
--- a/reminder.install
+++ b/reminder.install
@@ -41,7 +41,7 @@ function reminder_schema() {
'not null' => TRUE,
'default' => '0'
),
- 'interval' => array(
+ 'frequency' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
@@ -167,3 +167,25 @@ function reminder_update_7000(&$sandbox) {
$schema = reminder_schema();
db_create_table('reminder_notifications', $schema['reminder_notifications']);
}
+
+/**
+ * Change field 'interval' to 'frequency'.
+ */
+function reminder_update_7001(&$sandbox) {
+ // Make sure to not run this update twice.
+ if (db_field_exists('reminder', 'frequency')) {
+ return;
+ }
+
+ db_drop_field('reminder', 'interval');
+
+ db_add_field('reminder', 'frequency',
+ array(
+ 'description' => t('Reminder frequency.'),
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => '0'
+ )
+ );
+}