From a6cbaeb11254eca984449e67c29360bc9bd390de Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Wed, 16 Jun 2021 14:40:47 +0300 Subject: [PATCH] Bug 7021: Reintroduce usercode column This patch reintroduces usercode column to statistics table. To test: 1. Apply patch and update database 2. Confirm there's column usercode in statistics table Sponsored-by: Koha-Suomi Oy Signed-off-by: Chris Cormack --- .../Bug-7021-Reintroduce_usercode_column.perl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/Bug-7021-Reintroduce_usercode_column.perl diff --git a/installer/data/mysql/atomicupdate/Bug-7021-Reintroduce_usercode_column.perl b/installer/data/mysql/atomicupdate/Bug-7021-Reintroduce_usercode_column.perl new file mode 100644 index 00000000000..4a7a32a69e4 --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug-7021-Reintroduce_usercode_column.perl @@ -0,0 +1,10 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); + + $dbh->do("ALTER TABLE statistics ADD COLUMN usercode varchar(10) AFTER ccode"); + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 7021, "Bug 7021 - Reintroduce usercode column"); +} -- 2.17.1