function hosting_client_install in Hosting 5
Same name and namespace in other branches
- 6.2 client/hosting_client.install \hosting_client_install()
- 7.4 client/hosting_client.install \hosting_client_install()
- 7.3 client/hosting_client.install \hosting_client_install()
File
- client/
hosting_client.install, line 2
Code
function hosting_client_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {hosting_client} (\n vid int(10) unsigned NOT NULL default '0',\n nid int(10) unsigned NOT NULL default '0',\n name longtext,\n organization longtext,\n email varchar(255) NOT NULL default '',\n PRIMARY KEY (vid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
db_query("CREATE UNIQUE INDEX hosting_client_email_idx ON hosting_client (email)");
db_query("CREATE TABLE {hosting_client_user} (\n user int(10) unsigned NOT NULL default '0',\n client int(10) unsigned NOT NULL default '0',\n contact_type longtext NOT NULL,\n PRIMARY KEY (user, client)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
db_query("INSERT INTO {hosting_client_user} VALUES (1, 1, 'admin')");
break;
}
}