I still have problem with integer fields I've migrated.
Fields are not required. When I create a new node, if I leave the field empty I have that pdo exception

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'field_altitude_bas_value' at row 1: INSERT INTO {field_data_field_altitude_bas} (entity_type, entity_id, revision_id, bundle, delta, language, field_altitude_bas_value) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 2904 [:db_insert_placeholder_2] => 2904 [:db_insert_placeholder_3] => bisse [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => ) in field_sql_storage_field_storage_write() (line 448 of C:\Program Files (x86)\EasyPHP-5.3.8.1\www\cms\mdbMig50\modules\field\modules\field_sql_storage\field_sql_storage.module).

In fact, Drupal is trying to create a record in table field_data_field_xxx with value blank or something illegal.
Normally, for new field integer or noderef created in D7, when field stay empty or nothing is selected in select list, Drupal does not create a record.

This problem make it impossible to migrate from D6 to D7 if we have node reference fields that are not required.

Comments

mgifford’s picture

sahuni’s picture

Priority: Major » Normal

well, if I go in content type management, and update the field without anychange and save, pdo exception issue is solved.

odisei’s picture

sahuni, your solution helped me to reslove this issue. So simple, I should have tried it first... thanks!

oggsmith’s picture

Same problem here:

I had to create a view with a "References" display type , then save the node_reference fields in the affected content types - the error then stops and you can delete the view - as stated in this http://drupal.org/node/1450946

dhaneesh88’s picture

Can I automate this using some script rather than going to each field and update ?