After applying patch #3 in #895032: Upgrade fails on missing file_usage table the upgrade fails on the error below. Creating a new issue as the errors seems not be related.

Update #7059

    * Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'id' cannot be null: INSERT INTO {file_usage} (count, fid, module, type, id) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => 4 [:db_insert_placeholder_2] => file [:db_insert_placeholder_3] => node [:db_insert_placeholder_4] => ) in file_usage_add() (line 608 of /Users/erik/www/core/includes/file.inc).
CommentFileSizeAuthor
#2 system-update_fails-895088-1.patch756 bytessutharsan

Comments

pbuyle’s picture

I've the same issue (and I had #895032: Upgrade fails on missing file_usage table too).

sutharsan’s picture

Status: Active » Needs review
StatusFileSize
new756 bytes

Attached patch fixes this bug. Use the database in #895032: Upgrade fails on missing file_usage table to reproduce the bug.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Make sense.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Awesome!! Committed to HEAD.

Status: Fixed » Closed (fixed)
Issue tags: -D7 upgrade path

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