The node module attempts to perform an update that relies on the site having at least one node type. If you don't have any node types, a PDO Exception occurs during the update, thus preventing completion of the upgrade process:

Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1: SELECT DISTINCT type FROM {node} WHERE type NOT IN (); Array ( ) in node_update_7006() (line 577 of modules/node/node.install).

Steps to replicate:

- Delete all node types from a Drupal 6 site
- Attempt to upgrade to Drupal 7

CommentFileSizeAuthor
#2 node-1133402-1.patch1.22 KBq0rban
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

Status: Active » Closed (duplicate)

This is related to #1017672: D6 to D7 update process permanently deletes comment bodies and other data, and throws fatal SQL errors and is exactly the same hunks of code affected, although the patch there doesn't fix this. Marking as duplicate, should be a relatively easy addition over there.

q0rban’s picture

Status: Closed (duplicate) » Needs review
FileSize
1.22 KB
q0rban’s picture

Status: Needs review » Closed (duplicate)

Whoops, cross post, I see the patch you have over there looks like it would fix this issue, as it's using array_diff instead of WHERE NOT IN.