function custom_breadcrumbs_install in Custom Breadcrumbs 5
Same name and namespace in other branches
- 6.2 custom_breadcrumbs.install \custom_breadcrumbs_install()
- 6 custom_breadcrumbs.install \custom_breadcrumbs_install()
Implementation of hook_install().
File
- ./
custom_breadcrumbs.install, line 6
Code
function custom_breadcrumbs_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {custom_breadcrumb} (\n bid int unsigned NOT NULL auto_increment,\n titles varchar(255) NOT NULL default '',\n paths varchar(255) NOT NULL default '',\n visibility_php text NOT NULL default '',\n node_type varchar(64) default '',\n PRIMARY KEY (bid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
db_query("CREATE TABLE {custom_breadcrumb} (\n bid serial CHECK (bid >= 0),\n titles varchar(255) NOT NULL default '',\n paths varchar(255) NOT NULL default '',\n visibility_php text NOT NULL default '',\n node_type varchar(64) default ''\n )");
db_query("CREATE INDEX {custom_breadcrumb}_bid_idx ON {custom_breadcrumb} (bid)");
break;
}
}