contentdb
contentdb copied to clipboard
Too easy to end up installing older versions
Problem
It's not uncommon for releases to look like this:
- 1.2.0: MT 5.6 - 5.7
- 1.1.4: MT 5.6 - 5.7
- 1.1.3: MT 5.6 - 5.7
- 1.1.2: MT 5.6 - 5.7
- ....
- 0.8: MT 5.1+
The version 0.8 is unlikely to support 5.8 when later versions don't. The user has set the max version to 5.7 only on newer versions
Solutions
- Make it clearer what the latest release for each version is?
Another possibility is just to infer max of any release as being equal to the max of the first release after it that defined a max, so in this case you would infer that 0.8 was actually 5.1 - 5.7.
After identifying the latest candidate version, you can just search for the first release where max_version is not null order by release ID.