root/openweather/openweather.install

Revision 100, 0.9 KB (checked in by nigel, 4 years ago)

added total rain

Line 
1<?php
2
3function openweather_install() {
4  switch ($GLOBALS['db_type']) {
5    case 'mysql':
6    case 'mysqli':
7    case 'pgsql':
8    default:
9    db_query("CREATE TABLE `openweather_readings` (
10  `nid` INT( 10 ) NOT NULL ,
11  `timestamp` DATETIME NOT NULL ,
12  `temp_out` decimal(3,1) NOT NULL default '0.0',
13  `dewpoint` decimal(3,1) NOT NULL default '0.0',
14  `rel_hum_out` tinyint(3) NOT NULL default '0',
15  `windspeed` decimal(3,1) NOT NULL default '0.0',
16  `wind_angle` decimal(4,1) NOT NULL default '0.0',
17  `wind_chill` decimal(3,1) NOT NULL default '0.0',
18  `rain_1h` decimal(3,1) NOT NULL default '0.0',
19  `rain_total` DECIMAL( 5, 1 ) NOT NULL ,
20  `rel_pressure` decimal(5,1) NOT NULL default '0.0',
21  `tendency` varchar(7) NOT NULL default '',
22  `forecast` varchar(6) NOT NULL default ''
23)");
24  }
25  //drupal_set_message(t('Organic groups module enabled. Please see the included readme.txt file for further installation instructions.'));
26}
27 
Note: See TracBrowser for help on using the browser.