function data_update_6001 in Data 7
Same name and namespace in other branches
- 6 data.install \data_update_6001()
Move join information into meta fields.
File
- ./
data.install, line 121 - Install hooks for Data module.
Code
function data_update_6001() {
$ret = array();
$result = db_query('SELECT * FROM {data_join}');
while ($row = db_fetch_object($result)) {
if ($table = data_get_table($row->right_table)) {
$table
->link($row->left_table, $row->left_field, $row->right_field, $row->inner_join ? TRUE : FALSE);
}
}
db_drop_table('data_join');
// hook_update_N() no longer returns a $ret array. Instead, return
// nothing or a translated string indicating the update ran successfully.
// See http://drupal.org/node/224333#update_sql.
return t('TODO Add a descriptive string here to show in the UI.');
}