Created attachment 55834 [details] [review] Bug 17356: Add atomic update .perl skeleton file To show devs how it should be written. Test plan: % cp installer/data/mysql/atomicupdate/skeleton.perl installer/data/mysql/atomicupdate/bug_XXXXX.perl % perl installer/data/mysql/updatedatabase.pl You should see: DEV atomic update: bug_xxxxx.perl Upgrade to 16.06.00.XXX done (Bug XXXXX - description)
Followed test plan. I get an error with step: % perl installer/data/mysql/updatedatabase.pl DEV atomic update: bug_XXXXX.perl Atomic update generated errors: Undefined subroutine &main::column_exists called at (eval 1045) line 5.
Sorry, the dependency was wrong, you need patches from bug 17234.
Created attachment 55944 [details] [review] Bug 17356: Add atomic update .perl skeleton file To show devs how it should be written. Test plan: % cp installer/data/mysql/atomicupdate/skeleton.perl installer/data/mysql/atomicupdate/bug_XXXXX.perl % perl installer/data/mysql/updatedatabase.pl You should see: DEV atomic update: bug_xxxxx.perl Upgrade to 16.06.00.XXX done (Bug XXXXX - description) Signed-off-by: Liz Rea <liz@catalyst.net.nz> Very good. I'll submit a patch for the readme to make the instructions better.
Created attachment 55945 [details] [review] Bug 17356 - update README Test plan: Look at the README and make sure it makes sense.
Why not add a few lines to README and remove the skeleton.perl? Any dev would understand and is able to copy/paste. Now it executes skeleton.perl every time.
(In reply to Marcel de Rooy from comment #6) > Why not add a few lines to README and remove the skeleton.perl? > Any dev would understand and is able to copy/paste. > Now it executes skeleton.perl every time. It should not execute the skeleton, there is a next for this filename. It seems easier to use cp than edit, copy, create a new file, paste :)
I'm with Jonathan here.
Created attachment 56444 [details] [review] Bug 17356: Add atomic update .perl skeleton file To show devs how it should be written. Test plan: % cp installer/data/mysql/atomicupdate/skeleton.perl installer/data/mysql/atomicupdate/bug_XXXXX.perl % perl installer/data/mysql/updatedatabase.pl You should see: DEV atomic update: bug_xxxxx.perl Upgrade to 16.06.00.XXX done (Bug XXXXX - description) Signed-off-by: Liz Rea <liz@catalyst.net.nz> Very good. I'll submit a patch for the readme to make the instructions better. Signed-off-by: Liz Rea <liz@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 56445 [details] [review] Bug 17356 - update README Test plan: Look at the README and make sure it makes sense. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 56446 [details] [review] Bug 17356: [QA Follow-up] Minor changes to skeleton.perl Due to the way the snippet is run, there is no need to add a use for C4::Installer or define $dbh (just like $DBVersion). The suggested code is commented (column_exists is not defined). Just as in updatedatabase, CheckVersion is called. The version number does not need to contain 16.06; if we do so, we should update this number each release. The XXX's work just fine. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 16.11, thanks Jonathan, Liz, Marcel!