Bugzilla – Attachment 97502 Details for
Bug 24292
Upgrade failed, from 19.05 to 19.11 on Ubuntu 19.10: Can't load Unaccent.so
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24296: Update existing data in the database
Bug-24296-Update-existing-data-in-the-database.patch (text/plain), 2.99 KB, created by
Martin Renvoize (ashimema)
on 2020-01-17 11:40:40 UTC
(
hide
)
Description:
Bug 24296: Update existing data in the database
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-01-17 11:40:40 UTC
Size:
2.99 KB
patch
obsolete
>From 126951c83cb912ea76529556f7608ce0dd7fc2d7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 16 Jan 2020 09:01:34 +0000 >Subject: [PATCH] Bug 24296: Update existing data in the database > >This DB udpate adds the stockration states to the trigger enum in the >branchtransfers table and then populates it with any such data currently >contained within the comments field. > >https://bugs.koha-community.org/show_bug.cgi?id=24292 >--- > .../data/mysql/atomicupdate/bug_24296.perl | 45 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 46 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_24296.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_24296.perl b/installer/data/mysql/atomicupdate/bug_24296.perl >new file mode 100644 >index 0000000000..41fe00b8f9 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_24296.perl >@@ -0,0 +1,45 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ # Add stockrotation states to trigger enum >+ $dbh->do( >+ qq{ >+ ALTER TABLE >+ `branchtransfers` >+ MODIFY COLUMN >+ `trigger` enum( >+ 'Manual', >+ 'StockrotationAdvance', >+ 'StockrotationRepatriation' >+ ) >+ AFTER `comments` >+ } >+ ); >+ >+ # Move stockrotation states to trigger field >+ $dbh->do( >+ qq{ >+ UPDATE >+ `branchtransfers` >+ SET >+ `trigger` = 'StockrotationAdvance', >+ `comments` = NULL >+ WHERE >+ `comments` = 'StockrotationAdvance' >+ } >+ ); >+ $dbh->do( >+ qq{ >+ UPDATE >+ `branchtransfers` >+ SET >+ `trigger` = 'StockrotationRepatriation', >+ `comments` = NULL >+ WHERE >+ `comments` = 'StockrotationRepatriation' >+ } >+ ); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 24296 - Update stockrotation to use 'trigger' field in transfers table)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 4454b14969..5a62c3db39 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -951,7 +951,7 @@ CREATE TABLE `branchtransfers` ( -- information for items that are in transit be > `datearrived` datetime default NULL, -- the date the transfer arrived at its destination > `tobranch` varchar(10) NOT NULL default '', -- the branch the transfer was going to > `comments` LONGTEXT, -- any comments related to the transfer >- `trigger` ENUM('Manual'), -- what triggered the transfer >+ `trigger` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation'), -- what triggered the transfer > PRIMARY KEY (`branchtransfer_id`), > KEY `frombranch` (`frombranch`), > KEY `tobranch` (`tobranch`), >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24292
:
97502
|
97503