| 6 |
* .install file for decisions module |
* .install file for decisions module |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
// $Id$ |
// $Id: decisions.install,v 1.28 2008/12/05 03:48:02 anarcat Exp $ |
| 10 |
|
|
| 11 |
/** |
/** |
| 12 |
* Implementation of hook_install(). |
* Implementation of hook_install(). |
| 25 |
'algorithm' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE), |
'algorithm' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE), |
| 26 |
'showvotes' => array('type' => 'int', 'size' => 'tiny', 'not null' => FALSE, 'disp-width' => '4'), |
'showvotes' => array('type' => 'int', 'size' => 'tiny', 'not null' => FALSE, 'disp-width' => '4'), |
| 27 |
'startdate' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10')), |
'startdate' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10')), |
| 28 |
|
'randomize' => array('type' => 'int', 'size' => 'tiny', 'not null' => FALSE, 'default' => 1, 'disp-width' => '4'), |
| 29 |
'primary key' => array('nid'), |
'primary key' => array('nid'), |
| 30 |
); |
); |
| 31 |
|
|
| 114 |
return $items; |
return $items; |
| 115 |
} |
} |
| 116 |
|
|
| 117 |
|
function decisions_update_6000() { |
| 118 |
|
switch ($GLOBALS['db_type']) { |
| 119 |
|
case 'mysql': |
| 120 |
|
case 'mysqli': |
| 121 |
|
$items[] = update_sql("ALTER TABLE {decisions} ADD COLUMN `randomize` tinyint default '0'"); |
| 122 |
|
break; |
| 123 |
|
} |
| 124 |
|
return $items; |
| 125 |
|
} |
| 126 |
|
|
| 127 |
/** |
/** |
| 128 |
* Implementation of hook_uninstall(). |
* Implementation of hook_uninstall(). |
| 129 |
*/ |
*/ |