You are here

function migrate_update_6015 in Migrate 6

File

./migrate.install, line 614
Implementation of profile destination handling

Code

function migrate_update_6015() {
  $ret = array();

  // Add machine_name field - maximum length for generating table names
  // like migrate_msgs_<machine_name>
  db_add_field($ret, 'migrate_content_sets', 'machine_name', array(
    'type' => 'varchar',
    'length' => 50,
    'not null' => TRUE,
    'default' => '',
  ));

  // Initialize contents to mcsid (known unique)
  db_query("UPDATE {migrate_content_sets} SET machine_name = mcsid");

  // Now that the contents are unique, add a unique key
  db_add_unique_key($ret, 'migrate_content_sets', 'machine_name', array(
    'machine_name',
  ));
  return $ret;
}