function node_gallery_update_7000 in Node Gallery 7
Rename Drupal 6 tables for migration.
File
- ./
node_gallery.install, line 242 - Install, update and uninstall functions for the node_gallery module.
Code
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');
}
}