Hi. I followed steps in upgrading.txt. During the update of a D6 to D7 site I get this error:

Update #7001
Failed: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.node_gallery_relationships_d6' doesn't exist: SELECT * FROM {node_gallery_relationships_d6}; Array ( ) in _node_gallery_check_field_upgrades() (line 217 of ...\sites\all\modules\node_gallery\node_gallery.install).

Please any ideas how to fix? Thanks.

Comments

quicksketch’s picture

The database tables should be created for you in the previous update (#7000):

/**
 * Rename Drupal 6 tables for migration.
 */
function node_gallery_update_7000() {
  // The "node_gallery_galleries" table is used in both D6 and D7, but in
  // D7 the table is owned by node_gallery_api. In order to prevent them from
  // colliding, we rename it and then migrate the data.

  // Do our check based on a D6-only database table.
  if (db_table_exists('node_gallery_images')) {
    db_rename_table('node_gallery_galleries', 'node_gallery_galleries_d6');
    db_rename_table('node_gallery_images', 'node_gallery_images_d6');
    db_rename_table('node_gallery_relationships', 'node_gallery_relationships_d6');
  }
}

Did your D6 database have all three of these tables (node_gallery_galleries, node_gallery_images, node_gallery_relationships) before you tried to run the update? If any of them are missing, the updates will fail. They should all exist in a normal D6 installation of Node Gallery.

zeezhao’s picture

Status: Active » Closed (fixed)

Thanks. My D6 was on "6.x-2.0-beta1" so will need to upgrade that first to 3.x before doing D7 conversion.