[Koha-bugs] [Bug 13068] New feature for DB update and sandbox

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 15 10:24:22 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13068

--- Comment #16 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Paul Poulain from comment #15)
> tried this patch, and it seems to work, but I don't understand what makes
> the atomicupdate/something.sql not being executed when the file is added
> with a number:
> 
> I've added a DBRev for my test.sql, and the updater says "
> Skipping Bug-4246-Talking-Tech-itiva-phone-notifications.pl
> Skipping oai_sets.sql
> Skipping test.sql
> "
> which is exactly what I was expecting, but I don't understand what makes
> updatedatabse know that test.sql has been added "officially". If you can
> explain...

Will still respond to your comment before this one.
There are two points here:
[1] ExecDBRev checks the version; if CheckVersion is false, it returns just as
we always did. But it ALWAYS adds the file to the atomic hash. So it knows
later (in RunRemainingAtomicUpdates) that this file belongs to an official db
rev.
[2] If you add a dbrev, you also need to upgrade the version number in
kohaversion.pl. CheckVersion checks the codebase version via the
final_linear_version function. (Adding a dbrev without upgrading kohaversion
does not work. This is existing functionality.)

So, if you add the dbrev and upgrade kohaversion, updatedatabase will run your
file the first time as an official db rev. It will skip the file in the
RunRemaining sub. When running it a second time, the version check will skip
the dbrev but RunRemaining still knows that it should also skip the file.

Hope I was clear enough?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list