You are here

function filefield_paths_uninstall in File (Field) Paths 5

Same name and namespace in other branches
  1. 6.2 filefield_paths.install \filefield_paths_uninstall()
  2. 6 filefield_paths.install \filefield_paths_uninstall()
  3. 7 filefield_paths.install \filefield_paths_uninstall()

Implementation of hook_uninstall().

File

./filefield_paths.install, line 47

Code

function filefield_paths_uninstall() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("DROP TABLE IF EXISTS {filefield_paths}");
      break;
    case 'pgsql':
      db_query('DROP TABLE {filefield_paths}');
      break;
  }
  db_query("ALTER TABLE {files} DROP origname");
  variable_del('filefield_paths_schema_version');
}