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
Comment | File | Size | Author |
---|---|---|---|
#2 | node-1133402-1.patch | 1.22 KB | q0rban |
Comments
Comment #1
catchThis 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.
Comment #2
q0rban CreditAttribution: q0rban commentedComment #3
q0rban CreditAttribution: q0rban commentedWhoops, 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.