You are here

domain_conf.install in Domain Access 5

Install file.

File

domain_conf/domain_conf.install
View source
<?php

/**
 * @file
 * Install file.
 */

/**
 * Implement hook_install()
 */
function domain_conf_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query("CREATE TABLE IF NOT EXISTS {domain_conf} (\n           domain_id int(11) NOT NULL default '0',\n           settings blob,\n           PRIMARY KEY (domain_id)\n           ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {domain_conf} (\n        domain_id integer NOT NULL default '0',\n        settings bytea,\n        PRIMARY KEY (domain_id)\n        )");
      break;
  }
}

/**
 * Implement hook_uninstall()
 */
function domain_conf_uninstall() {
  db_query("DROP TABLE {domain_conf}");
}

Functions