function uc_cart_links_install in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_cart_links/uc_cart_links.install \uc_cart_links_install()
File
- uc_cart_links/
uc_cart_links.install, line 3
Code
function uc_cart_links_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {uc_cart_link_clicks} (\n cart_link_id varchar(32) NOT NULL default '0',\n clicks int(10) NOT NULL default '0',\n last_click int(10) NOT NULL default '0',\n PRIMARY KEY cart_link_id (cart_link_id)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
db_query("CREATE TABLE {uc_cart_link_clicks} (\n cart_link_id varchar(32) NOT NULL default 0,\n clicks integer NOT NULL default 0,\n last_click integer NOT NULL default 0,\n PRIMARY KEY (cart_link_id)\n )");
db_query("CREATE INDEX {uc_cart_link_clicks}_cart_link_id ON {uc_cart_link_clicks} (cart_link_id)");
break;
}
}