Closed (duplicate)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2010 at 12:09 UTC
Updated:
3 Mar 2011 at 18:57 UTC
I have just started working on a old Drupal 5 site with ubercart, that needs to be upgraded to Drupal 6.
During the upgrade process, I got a fatal error as db_next_id is deprecated and from what I've seen db_last_insert_id should be used instead.
This affects
• uc_flatrate.install
• uc_catelog.install
• uc_product.install
Comments
Comment #1
googletorp commentedFixed title.
Comment #2
longwaveI have successfully upgraded Ubercart sites from D5 to D6 and I don't really consider this a bug. The upgrade docs at http://drupal.org/node/340073 say:
If you do this, the functions containing db_next_id() will already have been run. However, these update functions should probably be removed from the .install files and replaced with hook_update_last_removed() so Drupal complains if you try to upgrade to 6.x without updating to the latest 5.x version first.
Comment #3
tr commentedLike longwave said, this is the way it's supposed to be.
I don't know where I read it, but once when I looked into the matter of hook_update_last_removed() I read that updates for the current and previous Drupal versions (D6 and D5 in this case) should be retained unless they are too numerous (e.g. the system.module). In Ubercart 3.x Lyle has already thrown away all the D5->D6 update functions as well as the D6->D6 update functions, but he hasn't used hook_update_last_removed() at all. So I'm going to move the issue to the UC 3.x queue and rename it to reflect what I think is the only outstanding question from this thread.
Comment #4
tr commentedRemoving tag.
Comment #5
tr commentedDiscussion continued in #1080028: Use hook_update_last_removed()