Forum OpenACS Development: Response to creating upgrade scripts

Collapse
Posted by Vinod Kurup on
OK, I've looked around a little and it seems the APM will label scripts as db-upgrade scripts if they're placed in either place (alongside other datamodel scripts OR in a separate upgrade folder). So, I vote that we keep them in a separate 'upgrade' folder for prettiness-sake 😊

In the post above, I mentioned that the script should be called upgrade-4.5b-4.5.sql, but that is wrong. The entire OpenACS tarball has those version numbers, but the APM looks at the version number associated with the individual package. My fix is in acs-content-repository which, in the beta-tarball, is at version 4.1.2. So, I assume that we should update the .info file of acs-content-repository to 4.5 and then my script would be called upgrade-4.1.2-4.5.sql.

So, if you had a site running 4.5beta, you could replace your current code with the new 4.5 tarball (via brute-force or with CVS magic), and click on 'Install Packages' from the APM. The APM would then notice that certain packages had new version numbers in their .info files and would offer you the option to upgrade those packages, loading only the scripts that would upgrade you from 4.1.2 (eg) to 4.5.

Hope this helps someone besides myself 😊