function uc_addresses_test_uninstall in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 tests/uc_addresses_test.install \uc_addresses_test_uninstall()
Implements hook_uninstall().
Removes fields defined by _uc_addresses_test_schema_fields() in tables defined by _uc_addresses_test_schema_tables().
Return value
array A list of changes in the database.
File
- tests/
uc_addresses_test.install, line 74 - Installation file for Ubercart Addresses testing module.
Code
function uc_addresses_test_uninstall() {
$ret = array();
$tables = _uc_addresses_test_schema_tables();
$fields = _uc_addresses_test_schema_fields();
foreach ($tables as $table) {
foreach ($fields as $fieldname => $field) {
if (!_uc_addresses_test_in_pane($table['prefix'], $field)) {
continue;
}
$tablename = $table['table'];
$tablefieldname = $table['prefix'] . $fieldname;
$ret[] = db_drop_field($tablename, $tablefieldname);
}
}
return $ret;
}