You are here

function serial_update_7132 in Serial Field 7

Reorganize table names to prevent collisions with long names.

File

./serial.install, line 90
Install, update and uninstall functions for the Serial module.

Code

function serial_update_7132() {
  module_load_include('inc', 'serial');
  foreach (db_find_tables('serial_%') as $table) {

    // Explode by underscores and match old format.
    list(, $entity_type, $bundle, $field_name) = explode('_', $table, 4);
    db_rename_table($table, _serial_get_table_name($entity_type, $bundle, $field_name));
  }
}