Browse Source

Bug 28534: Atomic update to fix existing installs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Nick Clemens 3 years ago
committed by Jonathan Druart
parent
commit
16859016d3
  1. 23
      installer/data/mysql/atomicupdate/bug28534.perl

23
installer/data/mysql/atomicupdate/bug28534.perl

@ -0,0 +1,23 @@
$DBversion = 'XXX';
if( CheckVersion( $DBversion ) ) {
if( !TableExists( 'pending_offline_operations' ) ) {
$dbh->do(q{
CREATE TABLE `pending_offline_operations` (
`operationid` int(11) NOT NULL AUTO_INCREMENT,
`userid` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`action` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
`barcode` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`cardnumber` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`amount` decimal(28,6) DEFAULT NULL,
PRIMARY KEY (`operationid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
});
} else {
$dbh->do(q{
ALTER TABLE pending_offline_operations ENGINE = 'InnoDB';
});
}
NewVersion( $DBversion, 28534, "Set pending_offline_operations INNoDB rather than MyISAM");
}
Loading…
Cancel
Save