This modifies a fresh install structure, and provides
an atomic update.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
--- /dev/null
+use C4::Installer;
+
+my $DBVersion = 'XXX';
+if ( CheckVersion( $DBversion ) ) {
+ print "Running... ";
+ unless ( column_exists( 'borrower_modifications', 'changed_fields' ) ) {
+ print "Running... ";
+ $dbh->do("ALTER TABLE borrower_modifications ADD changed_fields MEDIUMTEXT AFTER verification_token;");
+ }
+ print "Ran\n";
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 23151 - Add borrower_modifications.changed_fields column)\n";
+}
CREATE TABLE IF NOT EXISTS `borrower_modifications` (
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`verification_token` varchar(255) NOT NULL DEFAULT '',
+ `changed_fields` MEDIUMTEXT NOT NULL DEFAULT '',
`borrowernumber` int(11) NOT NULL DEFAULT '0',
`cardnumber` varchar(32) DEFAULT NULL,
`surname` LONGTEXT,