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