When migrating from D6 to D7 I got this error due to "is_primary" being a a tiny int

SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value adjusted for column 'is_primary' at row 1: ...... [:db_insert_placeholder_10] => 171 ) (..../includes/common.inc:7291)

which I fixed by editing location.migrate.inc line 121

if (!empty($instance_arguments)) {
- $instance_arguments['is_primary'] = $value;
+ $instance_arguments['is_primary'] = ($delta == 0);
$instance_arguments['inhibit_geocode'] = TRUE;

Hope thats useful

CommentFileSizeAuthor
#1 location-150421.patch733 bytesLouis Delacretaz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Louis Delacretaz’s picture

FileSize
733 bytes

I could not find any real definition of what the proper value of 'is_primary' should be except a link to a legacy civicrm usage. My patch is attached

podarok’s picture

Status: Needs review » Fixed

Thanks, merged

Status: Fixed » Closed (fixed)

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