Comment 3 for bug 1057183

Revision history for this message
Bill Erickson (berick) wrote :

In regard to:

2e91c29 2012-09-26 Add an explicit "set eg_version" at start of upgrade script <email address hidden>

My understanding of the purpose of the eg_version variable is to inform the scripts what version they are being applied to, not the version they are building toward. In other words, 2.2-2.3.0-upgrade-db.sql, should we not set the eg_version to 2.2.X instead of 2.3.0? I had assumed we didn't stamp the upgrade scripts like this because the source eg_version could differ depending on when it was applied (allowing the individual updates to occur or not, depending on whether they have since been superseded).

Hmm, related, I wonder if this:

INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.3.0', :eg_version);

...should in fact be the very last line of 2.2-2.3.0-upgrade-db.sql, instead of the first (or near the first), since the DB is not yet at that level until the script completes.