<?php
$fields = array(
'field_inspirational_imagery' => 'field_images',
);
// Loop through each of the fields/tables with the old name and change them
foreach($fields as $field_name => $new_field_name) {
// First check that field_name exists
if(!db_table_exists('field_data_' . $field_name)) {
// If we cannot find a data table then just continue.
continue;
}
// Define some things...
$data_table_name = 'field_data_' . $field_name;
$revision_table_name = 'field_revision_' .