/[drupal]/contributions/modules/spaces/spaces_ui.install
ViewVC logotype

Contents of /contributions/modules/spaces/spaces_ui.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Mon Oct 6 21:56:40 2008 UTC (13 months, 3 weeks ago) by yhahn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +22 -7 lines
File MIME type: text/x-php
Beginning merge of Spaces 2 to DRUPAL-6 branch
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 }

  ViewVC Help
Powered by ViewVC 1.1.2