Bugzilla – Attachment 150647 Details for
Bug 33262
When an ordered record is deleted, we lose all information on what was ordered
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33262: Add deleted_biblionumber column to aqorders table
Bug-33262-Add-deletedbiblionumber-column-to-aqorde.patch (text/plain), 2.52 KB, created by
Katrin Fischer
on 2023-05-04 11:16:11 UTC
(
hide
)
Description:
Bug 33262: Add deleted_biblionumber column to aqorders table
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-05-04 11:16:11 UTC
Size:
2.52 KB
patch
obsolete
>From 7073d977a244fdb27975167f055edb5c336c3ce6 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Thu, 4 May 2023 11:03:30 +0000 >Subject: [PATCH] Bug 33262: Add deleted_biblionumber column to aqorders table > >This adds a new column deleted_biblionumber to the aqorders table. >This will allow us to store the biblionumber of a deleted record, >so we will still be able to tell what has been ordered once the >record is deleted. > >Test plan in last patch. >--- > .../data/mysql/atomicupdate/bug_33262.pl | 20 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 21 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_33262.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33262.pl b/installer/data/mysql/atomicupdate/bug_33262.pl >new file mode 100755 >index 0000000000..3acafc8cfb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33262.pl >@@ -0,0 +1,20 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "33262", >+ description => "Store biblionumber of deleted record in acquisition orders", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ if ( !column_exists( 'aqorders', 'deleted_biblionumber' ) ) { >+ >+ $dbh->do( >+ q{ >+ ALTER TABLE `aqorders` >+ ADD COLUMN `deleted_biblionumber` int(11) NULL DEFAULT NULL COMMENT 'links the order to the deleted bibliographic record (deletedbiblio.biblionumber)' AFTER biblionumber >+ } >+ ); >+ } >+ say $out "Added column 'aqorders.deleted_biblionumber'"; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 50796112dc..1147d34132 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -659,6 +659,7 @@ DROP TABLE IF EXISTS `aqorders`; > CREATE TABLE `aqorders` ( > `ordernumber` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha to each line', > `biblionumber` int(11) DEFAULT NULL COMMENT 'links the order to the biblio being ordered (biblio.biblionumber)', >+ `deleted_biblionumber` int(11) DEFAULT NULL COMMENT 'links the order to the deleted bibliographic record deletedbiblio.biblionumber)', > `entrydate` date DEFAULT NULL COMMENT 'the date the bib was added to the basket', > `quantity` smallint(6) DEFAULT NULL COMMENT 'the quantity ordered', > `currency` varchar(10) DEFAULT NULL COMMENT 'the currency used for the purchase', >-- >2.30.2
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 33262
:
150647
|
150657
|
150658
|
150659
|
150660
|
150661
|
150662
|
150663
|
150664
|
150680
|
150681
|
150682
|
150683
|
150684
|
150702
|
150703
|
150704
|
150705
|
150706
|
150734
|
150735
|
150736
|
150737
|
150738