<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi there!<br>
<br>
I heard the community is moving to atomicupdates.<br>
We moved to atomicupdates as well!<br>
<br>
To help us better manage atomicupdates, I devised a installer to keep track of which atomicupdates have already been applied so we don't apply the same updates many times.<br>
Also when we deploy/backport more and more feature, it becomes really hard to know which atomicupdates have been installed and which have not.<br>
<br>
Check this Bug out if you are putting features in production before they get to master. There is also a nice slide show!<br>
<a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14698">http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14698</a><br>
<br>
Here is the --help from atomicupdates.pl, it introduces itself quite nicely!<br>
<br>
<<SNIP  atomicupdates.pl<br>
<font face="Courier New, Courier, monospace">Runs all the not-yet-applied atomicupdate-scripts and sql in the<br>
atomicupdates-directory, in the order specified by the _updateorder-file.<br>
<br>
This script uses koha.atomicupdates-table to see if the update has already been<br>
applied.<br>
<br>
Also acts as a gateway to CRUD the koha.atomicupdates-table.<br>
<br>
    -v --verbose        Integer, 1 is not so verbose, 3 is maximally verbose.<br>
    -h --help           Flag, This nice help!<br>
    -a --apply          Flag, Apply all the pending atomicupdates from the<br>
                        atomicupdates-directory.<br>
    -d --directory      Path, From which directory to look for atomicupdate-scripts.<br>
                        Defaults to '$KOHA_PATH/installer/data/mysql/atomicupdate/'<br>
    -r --remove         String, Remove the upgrade entry from koha.atomicupdates<br>
                        eg. --remove "Bug71337"<br>
    -i --insert         Path, Add an upgrade log entry for the given atomicupdate-file.<br>
                        Useful to revert an accidental --remove -operation or for<br>
                        testing.<br>
                        eg. -i installer/data/mysql/atomicupdate/Bug5453-Example.pl<br>
    -l --list           Flag, List all entries in the koha.atomicupdates-table.<br>
                        This typically means all applied atomicupdates.<br>
    -p --pending        Flag, List all pending atomicupdates from the<br>
                        atomicupdates-directory.<br>
    -g --git            Path, Build the update order from the Git repository given,<br>
                        or default to the Git repository in $KOHA_PATH.<br>
                        Eg. --git 1, to build with default values, or<br>
                            --git /tmp/kohaclone/ to look for another repository<br>
<br>
EXAMPLES:<br>
<br>
    atomicupdate.pl -g 1 -a<br>
<br>
Looks for the Git repository in $KOHA_PATH, parses the issue/commit identifiers<br>
from the top 10000 commits and generates the _updateorder-file to tell in which<br>
order the atomicupdates-scripts are executed.<br>
Then applies all pending atomicupdate-scripts in the order (oldest to newest)<br>
presented in the Git repository.<br>
<br>
<br>
    atomicupdate --apply -d /home/koha/kohaclone/installer/data/mysql/atomicupdate/<br>
<br>
Applies all pending atomicupdate-scripts from the given directory. If the file<br>
'_updateorder' is not present, it must be first generated, for example with the<br>
--git 1 argument.<br>
<br>
UPDATEORDER:<br>
<br>
When deploying more than one atomicupdate, it is imperative to know in which order<br>
the updates are applied. Atomicupdates can easily depend on each other and fail in<br>
very strange and hard-to-debug -ways if the prerequisite modifications are not<br>
in effect.<br>
The correct update order is defined in the atomicupdates/_updateorder-file. This is<br>
a simple list of issue/commit identifiers, eg.<br>
<br>
    Bug5454<br>
    Bug12432<br>
    Bug3218<br>
    #45<br>
<br>
This file is most easily generated directly from the original Git repository, since<br>
the order in which the Commits have been introduced most definetely is the order<br>
they should be applied.<br>
When deploying the atomicupdates to production environments without the<br>
Git repository, the _updateorder file must be copied along the atomicupdate-scripts.<br>
<br>
P.S. Remember to put atomicupdate/_updateorder to your .gitignore</font><br>
SNAP>><br>
<pre class="moz-signature" cols="72">-- 

Olli-Antti Kivilahti
Järjestelmäkeittäjä
vaarakirjastot.fi
+358 50 449 7763
--Powered by Kubuntu Linux!
</pre>
</body>
</html>