You are here

function uc_file_uninstall in Ubercart 5

Same name and namespace in other branches
  1. 8.4 uc_file/uc_file.install \uc_file_uninstall()
  2. 6.2 uc_file/uc_file.install \uc_file_uninstall()
  3. 7.3 uc_file/uc_file.install \uc_file_uninstall()

File

uc_file/uc_file.install, line 64

Code

function uc_file_uninstall() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query("DROP TABLE IF EXISTS {uc_files}");
      db_query("DROP TABLE IF EXISTS {uc_file_products}");
      db_query("DROP TABLE IF EXISTS {uc_file_users}");
      db_query("DELETE FROM {uc_product_features} WHERE fid = 'file'");
      break;
    case 'pgsql':
      db_query("DROP TABLE {uc_files}");
      db_query("DROP TABLE {uc_file_products}");
      db_query("DROP TABLE {uc_file_users}");
      db_query("DELETE FROM {uc_product_features} WHERE fid = 'file'");
      break;
  }
}