The Drupal 5.x version of Path Redirect uses path as the primary key and rid as a unique key. Drupal 6.x, however does the opposite and there doesn't seem to be any update that makes this change.

Comments

HorsePunchKid’s picture

Status: Active » Needs review
StatusFileSize
new638 bytes
new1.63 KB

Good catch. Here are patches for 5.x and 6.x. I tested in both MySQL and Postgres the upgrades from 5.x-1.1 to 5.x-1.x-dev and from 5.x-1.1 to 6.x-1.x-dev, so I'm fairly confident that they're working well.

HorsePunchKid’s picture

Title: Schema difference between Drupal 5.x and Drupal 6.x versions » Provide schema update for changed primary key
Status: Needs review » Fixed

Committed. Titled changed because this actually applies to 5.x independent of 6.x. Patch for 5.x above didn't include an updated hook_install, but I fixed that and committed it. Thanks again for spotting the problem!

junyor’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev
Status: Fixed » Active

I'm not sure the committed fix will work for existing users. For instance, what if a user upgrades to 6.x without first upgrading to the latest 5.x? And what if the user has already run update #4?

HorsePunchKid’s picture

If a user upgrades from any 5.x release (i.e. non-dev-version) to 6.x, the 6.x installer has the same update functions that the 5.x branch has, only rewritten for the 6.x API. If a user has already run update 4 because they were running a dev version, they presumably know how to deal with that:

UPDATE {system} SET schema_version = 3 WHERE name = 'path_redirect'

Then run update.php, and you'll get the necessary updates. As far as I understand, upgrading from dev versions is not something that needs to be explicitly supported. That said, since we've had this dev version sitting around for quite some time, it might make sense to add another update function; I'm just not (yet) convinced it's necessary.

I have some more patches to port to 6.x before releasing it, anyway, and I'll make sure to test the upgrade paths before I do.

junyor’s picture

Status: Active » Fixed

Got it. I'll run the update manually.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.