You are here

hosting_alias.install in Hosting 5

File

alias/hosting_alias.install
View source
<?php

function hosting_alias_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {hosting_site_alias} (\n        vid int NOT NULL DEFAULT '0',\n        nid int(10) unsigned NOT NULL DEFAULT '0',\n        alias varchar(128) NOT NULL,\n        automatic INT(1) NOT NULL DEFAULT '0',\n        KEY (vid, alias)\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
  }
}
function hosting_alias_uninstall() {
  db_query("DROP TABLE {hosting_site_alias}");
}

/**
 * This removes dodgy data created by an import bug
 */
function hosting_alias_update_1() {
  $ret = array();
  $ret[] = update_sql("DELETE FROM {hosting_site_alias} WHERE alias='Array'");
  return $ret;
}

Functions

Namesort descending Description
hosting_alias_install
hosting_alias_uninstall
hosting_alias_update_1 This removes dodgy data created by an import bug