You are here

function migrate_update_6003 in Migrate 6.2

Same name and namespace in other branches
  1. 6 migrate.install \migrate_update_6003()

Add and populate class_name field, and add arguments field. Any existing migration code using dependencies or sourceMigration() must be changed! See CHANGELOG.txt.

File

./migrate.install, line 223
Migrate module installation

Code

function migrate_update_6003() {
  $ret = array();
  db_add_field($ret, 'migrate_status', 'class_name', array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '',
    'description' => 'Name of class to instantiate for this migration',
  ));
  db_query("UPDATE {migrate_status}\n            SET class_name = CONCAT(machine_name, 'Migration')\n           ");
  db_add_field($ret, 'migrate_status', 'arguments', array(
    'type' => 'blob',
    'not null' => FALSE,
    'size' => 'big',
    'serialize' => TRUE,
    'description' => 'A serialized array of arguments to the migration constructor',
  ));
  return $ret;
}