| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: rules_scheduler.install,v 1.1.2.6 2009/07/13 13:34:27 fago Exp $ 3 4 5 /** 6 * @file 7 * Rules Scheduler - Installation file. 8 */ 9 10 /** 11 * Implementation of hook_install(). 12 */ 13 function rules_scheduler_install() { 14 drupal_install_schema('rules_scheduler'); 15 } 16 17 /** 18 * Implementation of hook_uninstall(). 19 */ 20 function rules_scheduler_uninstall() { 21 drupal_uninstall_schema('rules_scheduler'); 22 } 23 24 /** 25 * Implementation of hook_schema(). 26 */ 27 function rules_scheduler_schema() { 28 29 $schema['rules_scheduler'] = array( 30 'description' => t('Stores a schedule for rule sets.'), 31 'fields' => array( 32 'tid' => array( 33 'type' => 'serial', 34 'unsigned' => TRUE, 35 'not null' => TRUE, 36 'description' => t("The scheduled task's id."), 37 ), 38 'set_name' => array( 39 'type' => 'varchar', 40 'length' => '255', 41 'default' => '', 42 'not null' => TRUE, 43 'description' => t("The scheduled rule set's name."), 44 ), 45 'date' => array( 46 'type' => 'datetime', 47 'not null' => TRUE, 48 'description' => t('When the task is to be scheduled.'), 49 ), 50 'arguments' => array( 51 'type' => 'text', 52 'not null' => FALSE, 53 'serialize' => TRUE, 54 'description' => t('The whole, serialized item configuration.'), 55 ), 56 'identifier' => array( 57 'type' => 'varchar', 58 'length' => '255', 59 'default' => '', 60 'not null' => FALSE, 61 'description' => t('The user defined string identifying this task.'), 62 ), 63 ), 64 'primary key' => array('tid'), 65 'indexes' => array('date' => array('date')), 66 ); 67 return $schema; 68 } 69 70 /** 71 * Implementation of hook_update_N(). Adds an identifier field to the table. 72 */ 73 function rules_scheduler_update_6100() { 74 $spec = array( 75 'type' => 'varchar', 76 'length' => '255', 77 'default' => '', 78 'not null' => FALSE, 79 'description' => t('The user defined string identifying this task.'), 80 ); 81 $ret = array(); 82 db_add_field($ret, 'rules_scheduler', 'identifier', $spec); 83 drupal_set_message(t('Notice: concrete scheduling dates have to be specified in GMT now, so be aware to add out your local timezone!')); 84 return $ret; 85 } 86
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |