function domain_user_install in Domain Access 5
Same name and namespace in other branches
- 6.2 domain_user/domain_user.install \domain_user_install()
Implement hook_install()
File
- domain_user/
domain_user.install, line 13 - Install file for the Domain User module
Code
function domain_user_install() {
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
db_query("CREATE TABLE IF NOT EXISTS {domain_user} (\n domain_id int(11) NOT NULL default '0',\n uid int(11) NOT NULL default '0',\n INDEX (domain_id),\n INDEX (uid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
db_query("CREATE TABLE {domain_user} (\n domain_id integer NOT NULL default 0,\n uid integer NOT NULL default 0\n )");
db_query("CREATE INDEX {domain_user}_domain_id_idx ON {domain_user} (domain_id)");
db_query("CREATE INDEX {domain_user}_uid_idx ON {domain_user} (uid)");
break;
}
}