You are here

spaces.install in Spaces 5

File

spaces.install
View source
<?php

/**
 * Implementaton of hook_install().
 */
function spaces_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query("UPDATE {system} SET weight = 20 WHERE name = 'spaces'");
      db_query("CREATE TABLE {spaces_features} (\n                gid int(10) NOT NULL default '0',\n                type int(1) NOT NULL default '0',\n                id longtext NOT NULL,\n                value longtext NOT NULL,\n                KEY (gid)\n                ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
      db_query("CREATE TABLE {spaces_features_custom} (\n                gid int(10) NOT NULL default '0',\n                labels longtext NOT NULL,\n                weights longtext NOT NULL,\n                PRIMARY KEY  (gid)\n                ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
      db_query("CREATE TABLE {spaces_features_ui} (\n                feature varchar(30) NOT NULL default '',\n                label varchar(255) NOT NULL default '',\n                description longtext,\n                PRIMARY KEY (feature)\n                ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
  }
}

Functions

Namesort descending Description
spaces_install Implementaton of hook_install().