When running this script via web interface or drush script I'm getting a handful of mySQL errors referencing a"target_type" column. After a bit of research, I believe this is why: #1319040: Remove "target_type" column from db

Note I'm using the latest entity reference 2012-Feb-14 7.x-1.x-dev.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

John Pitcairn’s picture

Same here. Full error:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=30&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'field_download_target_type' doesn't exist in table: CREATE TABLE {field_data_field_download} ( `entity_type` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The entity type this data is attached to', `bundle` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The field instance bundle to which this row belongs, used when deleting a field instance', `deleted` TINYINT NOT NULL DEFAULT 0 COMMENT 'A boolean indicating whether this data item has been deleted', `entity_id` INT unsigned NOT NULL COMMENT 'The entity id this data is attached to', `revision_id` INT unsigned NULL DEFAULT NULL COMMENT 'The entity revision id this data is attached to, or NULL if the entity type is not versioned', `language` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'The language for this data item.', `delta` INT unsigned NOT NULL COMMENT 'The sequence number for this data item, used for multi-value fields', `field_download_target_id` INT unsigned NULL DEFAULT NULL COMMENT 'The id of the target entity', PRIMARY KEY (`entity_type`, `entity_id`, `deleted`, `delta`, `language`), INDEX `entity_type` (`entity_type`), INDEX `bundle` (`bundle`), INDEX `deleted` (`deleted`), INDEX `entity_id` (`entity_id`), INDEX `revision_id` (`revision_id`), INDEX `language` (`language`), INDEX `field_download_target_entity` (`field_download_target_type`, `field_download_target_id`), INDEX `field_download_target_id` (`field_download_target_id`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Data storage for field 31 (field_download)'; Array ( ) in db_create_table() (line 2688 of /Volumes/Opus Locus/Sites/_drupal7/core/includes/database/database.inc).
martysteer’s picture

This patch fixed this migration error due to field change (*_target_type) using EntityReference 7.x-1.0-rc1.

martysteer’s picture

reattach cuz it didn't seem to attach properly.

BTMash’s picture

Ack, I had not received notifications on my own project. Thank you for filing this. I'll try and review sometime this week and have it in.

BTMash’s picture

Status: Active » Fixed

I've done a blind commit (will be testing it out soon, hehe) but you should attributed correctly, @martysteer.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.