Browse Source
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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>16.11.x
2 changed files with 11 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||
use C4::Installer; |
|||
my $dbh = C4::Context->dbh; |
|||
$DBversion = '16.06.00.XXX'; |
|||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) { |
|||
unless( column_exists( 'biblio', 'biblionumber' ) ) { # or constraint_exists( $table_name, $key_name ) |
|||
warn "There is something wrong"; |
|||
} |
|||
SetVersion ($DBversion); |
|||
print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; |
|||
} |
Loading…
Reference in new issue