You are here

domain_theme.install in Domain Access 5

Install file for the Domain Theme module

File

domain_theme/domain_theme.install
View source
<?php

/**
 * @file
 * Install file for the Domain Theme module
 */

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

/**
 * Implement hook_uninstall()
 */
function domain_theme_uninstall() {
  db_query("DROP TABLE {domain_theme}");
  variable_del('domain_theme_weight');
}

Functions