| 1 |
<?php
|
| 2 |
// $Id: spaces_ui.install,v 1.1.6.1 2008/09/29 04:40:05 yhahn Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementaton of hook_install().
|
| 6 |
*/
|
| 7 |
function spaces_ui_install() {
|
| 8 |
switch ($GLOBALS['db_type']) {
|
| 9 |
case 'mysqli':
|
| 10 |
case 'mysql':
|
| 11 |
db_query("CREATE TABLE {spaces_features_ui} (
|
| 12 |
feature varchar(30) NOT NULL default '',
|
| 13 |
value longtext NOT NULL default '',
|
| 14 |
PRIMARY KEY (feature)
|
| 15 |
) /*!40100 DEFAULT CHARACTER SET UTF8 */");
|
| 16 |
}
|
| 17 |
}
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Implementation of hook_uninstall().
|
| 21 |
*/
|
| 22 |
function spaces_ui_uninstall() {
|
| 23 |
// Drop database table
|
| 24 |
db_query('DROP TABLE {spaces_features_ui}');
|
| 25 |
}
|
| 26 |
|
| 27 |
function spaces_ui_update_1() {
|
| 28 |
$update = array();
|
| 29 |
$update[] = update_sql("ALTER TABLE {spaces_features_ui} DROP COLUMN label");
|
| 30 |
$update[] = update_sql("ALTER TABLE {spaces_features_ui} DROP COLUMN description");
|
| 31 |
$update[] = update_sql("ALTER TABLE {spaces_features_ui} ADD COLUMN value longtext NOT NULL default '' AFTER feature");
|
| 32 |
return $update;
|
| 33 |
}
|