D6 to D7 upgrade error Invalid datetime format Incorrect integer value After upgrading a D6 to D7 site. I get this error when trying to save an existing page on the site that has uploaded image files, and the page will not save. If I remove the uploaded files, the error goes away and I can save the page.


  PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect
  integer value: '' for column 'field_upload_inline_image_width' at row
  1: INSERT INTO {field_data_field_upload_inline_image} (entity_type,
  entity_id, revision_id, bundle, delta, language,
  field_upload_inline_image_fid, field_upload_inline_image_alt,
  field_upload_inline_image_title, field_upload_inline_image_width,
  field_upload_inline_image_height) 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,
  :db_insert_placeholder_7, :db_insert_placeholder_8,
  :db_insert_placeholder_9, :db_insert_placeholder_10); Array (
  [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 37
  [:db_insert_placeholder_2] => 25955 [:db_insert_placeholder_3] => page
  [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und
  [:db_insert_placeholder_6] => 24 [:db_insert_placeholder_7] => NNSA
  Headquarters [:db_insert_placeholder_8] => [:db_insert_placeholder_9]
  => [:db_insert_placeholder_10] => ) in field_sql_storage_field_storage_write() (line 514 of
  /var/www/html/upgrade2a/modules/field/modules/field_sql_storage/field_sql_storage.module).


This is my table structure field_upload_inline_image, do i need to alter the Type or Null column?

entity_type (Primary) varchar(128)  No The entity type this data is attached to
bundle varchar(128) No The field instance bundle to which this row belongs, used when deleting a field instance
deleted (Primary) tinyint(4)    No 0 A boolean indicating whether this data item has been deleted
entity_id (Primary) int(10) No The entity id this data is attached to
revision_id int(10) Yes NULL The entity revision id this data is attached to, or NULL if the entity type is not versioned
language (Primary) varchar(32)  No The language for this data item.
delta (Primary) int(10) No The sequence number for this data item, used for multi-value fields
field_upload_inline_image_fid int(10)   Yes NULL The file_managed.fid being referenced in this field.
field_upload_inline_image_alt varchar(512)  Yes NULL Alternative image text, for the image’s ’alt’ attribute.
field_upload_inline_image_title varchar(1024)   Yes NULL Image title text, for the image’s ’title’ attribute.
field_upload_inline_image_width int(10) Yes NULL The width of the image in pixels.
field_upload_inline_image_height int(10)    Yes NULL


I'm using Media 7.x-1.5 Bundled with File entity 7.x-1.5. I am not using UUID module.
maybe I need to then I will need
the file_managed table is missing the uuid column
I should have posted the answer here instead, it may help someone. This is fixed. I had missing images in the /sites/default/files/ folder. This was a upgraded d6 to d7 site with 4000 nodes and many images. I did not have the latest images in my files folder. So saving a node with uploaded cck field images threw this error.