function content_migrate_new_columns in Content Construction Kit (CCK) 7.3
Helper function for figuring out column names to be used when storing D7 field data.
Parameters
unknown_type $field:
Return value
unknown
1 call to content_migrate_new_columns()
- _content_migrate_batch_process_migrate_data in modules/
content_migrate/ includes/ content_migrate.admin.inc - Batch operation callback to migrate data. Copy old table data to new field table.
File
- modules/
content_migrate/ content_migrate.module, line 148 - Code For D6 to D7 field data update.
Code
function content_migrate_new_columns($field) {
$columns = array();
if (empty($field['storage']['details'])) {
foreach ($field['columns'] as $column_name => $values) {
$columns[$column_name] = $field['field_name'] . '_' . $column_name;
}
return $columns;
}
else {
// There is only one table in this array, but the columns for all tables are the same so it doesn't matter.
foreach ($field['storage']['details']['sql'][FIELD_LOAD_CURRENT] as $table => $columns) {
return $columns;
}
}
}