You are here

uc_coupon_purchase.install in Ubercart Discount Coupons 5

File

uc_coupon_purchase/uc_coupon_purchase.install
View source
<?php

function uc_coupon_purchase_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query("CREATE TABLE {uc_coupon_purchase} (\n        pfid mediumint(9) NOT NULL,\n        nid int(10) NOT NULL,\n        model varchar(255) default NULL,\n        base_cid int(11) NOT NULL,\n        KEY pfid (pfid),\n        KEY nid (nid),\n        KEY model (model)\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
  }
}
function uc_coupon_purchase_uninstall() {
  db_query("DROP TABLE {uc_coupon_purchase}");
  db_query("DELETE FROM {variable} WHERE name LIKE 'uc_coupon_purchase_%%'");
}