domain_source.install in Domain Access 5
Same filename and directory in other branches
Install file for the Domain Source module
File
domain_source/domain_source.installView source
<?php
/**
* @file
* Install file for the Domain Source module
*/
/**
* Implement hook_install()
*
* @ingroup drupal
*/
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;
}
}
/**
* Implement hook_uninstall()
*/
function domain_source_uninstall() {
db_query("DROP TABLE {domain_source}");
}
Functions
Name | Description |
---|---|
domain_source_install | Implement hook_install() |
domain_source_uninstall | Implement hook_uninstall() |