backdrop-contrib / og

The Organic Groups module provides users the ability to create, manage, and delete 'groups' on a site.
GNU General Public License v2.0
1 stars 8 forks source link

`og_update_last_removed()` should be 7205, not 7206 #137

Closed argiepiano closed 1 year ago

argiepiano commented 1 year ago

When upgrading from D7, you get og module can not be updated. Its schema version is 7205. Updates up to and including 7206 have been removed in this release. In order to update og module, you will first [need to upgrade](https://backdropcms.org/upgrade) to the last version in which these updates were available.

This is because the og_update_last_removed() indicates 7206 instead 7205, which is the last update in the current OG D7 version.

olafgrabienski commented 1 year ago

Interesting! IIRC, I didn't run into this when I upgraded a site from D7 two months ago. Have there been relevant changes in D7 or Backdrop since then?

laryn commented 1 year ago

It looks like 7206 is in the dev version, which is probably what was ported from. So maybe the best solution is to change it to 7205 if that's the latest recommended on D7, and then include the code from 7206 again as a hook for Backdrop that will run after upgrade (but which won't give an error if it's already been run).

https://git.drupalcode.org/project/og/-/blob/7.x-2.x/og.install#L1194-1199

argiepiano commented 1 year ago

I agree about changing the last removed to 7205. Adding the 7206 as a hook in Backdrop is not needed, because the index lookup has been part of the schema since Backdrop's first release. So every site using OG since its first release already has that index.

argiepiano commented 1 year ago

Actually no, you are right @laryn. We'd need to add 7206 as a hook for those sites upgrading from the current D7 version

argiepiano commented 1 year ago

I was looking at a super old version of OG. This issue was already fixed (by @laryn!!) in #42. Sorry about the false alarm. Closing.