You are here

function domain_source_install in Domain Access 5

Same name and namespace in other branches
  1. 8 domain_source/domain_source.install \domain_source_install()
  2. 6.2 domain_source/domain_source.install \domain_source_install()

Implement hook_install()

File

domain_source/domain_source.install, line 13
Install file for the Domain Source module

Code

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