You are here

spaces_ui.install in Spaces 5.2

Same filename and directory in other branches
  1. 5 spaces_ui.install

File

spaces_ui.install
View source
<?php

/**
 * Implementaton of hook_install().
 */
function spaces_ui_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query("CREATE TABLE {spaces_features_ui} (\n        feature varchar(30) NOT NULL default '',\n        value longtext NOT NULL default '',\n        PRIMARY KEY (feature)\n        ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
  }
}

/**
 * Implementation of hook_uninstall().
 */
function spaces_ui_uninstall() {

  // Drop database table
  db_query('DROP TABLE {spaces_features_ui}');
}
function spaces_ui_update_1() {
  $update = array();
  $update[] = update_sql("ALTER TABLE {spaces_features_ui} DROP COLUMN label");
  $update[] = update_sql("ALTER TABLE {spaces_features_ui} DROP COLUMN description");
  $update[] = update_sql("ALTER TABLE {spaces_features_ui} ADD COLUMN value longtext NOT NULL default '' AFTER feature");
  return $update;
}

Functions

Namesort descending Description
spaces_ui_install Implementaton of hook_install().
spaces_ui_uninstall Implementation of hook_uninstall().
spaces_ui_update_1