You are here

function spaces_install in Spaces 5.2

Same name and namespace in other branches
  1. 5 spaces.install \spaces_install()
  2. 6.3 spaces.install \spaces_install()
  3. 6 spaces.install \spaces_install()
  4. 6.2 spaces.install \spaces_install()
  5. 7.3 spaces.install \spaces_install()
  6. 7 spaces.install \spaces_install()

Implementaton of hook_install().

File

./spaces.install, line 6

Code

function spaces_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query("CREATE TABLE {spaces} (\n        sid int(10) NOT NULL default '0',\n        type varchar(64) NOT NULL,\n        preset varchar(64) NOT NULL,\n        customizer longtext NOT NULL,\n        KEY (sid)\n        ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
      db_query("CREATE TABLE {spaces_presets} (\n        type varchar(64) NOT NULL,\n        id varchar(64) NOT NULL,\n        name varchar(255) NOT NULL,\n        description longtext NOT NULL,\n        value longtext NOT NULL,\n        KEY (type)\n        ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
      db_query("CREATE TABLE {spaces_settings} (\n        sid int(10) NOT NULL default '0',\n        type varchar(64) NOT NULL,\n        id longtext NOT NULL,\n        value longtext NOT NULL,\n        KEY (sid)\n        ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
      db_query("CREATE TABLE {spaces_features} (\n        sid int(10) NOT NULL default '0',\n        type varchar(64) NOT NULL,\n        id longtext NOT NULL,\n        value longtext NOT NULL,\n        KEY (sid)\n        ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
  }
}