function uc_addresses_example_uninstall in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 uc_addresses_example/uc_addresses_example.install \uc_addresses_example_uninstall()
Implements hook_uninstall().
Removes fields defined by _uc_addresses_example_schema_fields() in tables defined by _uc_addresses_example_schema_tables().
Return value
array A list of changes in the database.
File
- uc_addresses_example/
uc_addresses_example.install, line 61 - Install file for Ubercart Addresses Example module.
Code
function uc_addresses_example_uninstall() {
$ret = array();
$tables = _uc_addresses_example_schema_tables();
$fields = _uc_addresses_example_schema_fields();
foreach ($tables as $table) {
foreach ($fields as $fieldname => $field) {
$tablename = $table['table'];
$tablefieldname = $table['prefix'] . $fieldname;
$ret[] = db_drop_field($tablename, $tablefieldname);
}
}
return $ret;
}