Bugzilla – Attachment 153157 Details for
Bug 28844
Suggestion from existing title can alert patron in error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28844: DB changes
Bug-28844-DB-changes.patch (text/plain), 3.48 KB, created by
Jonathan Druart
on 2023-07-07 11:37:09 UTC
(
hide
)
Description:
Bug 28844: DB changes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-07-07 11:37:09 UTC
Size:
3.48 KB
patch
obsolete
>From 2826635e1ed8ab4b57b2d91e0cb8dcc29af237c4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 10 May 2023 14:50:14 +0200 >Subject: [PATCH] Bug 28844: DB changes > >--- > installer/data/mysql/atomicupdate/bug_28844.pl | 18 ++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 +++- > 2 files changed, 21 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_28844.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_28844.pl b/installer/data/mysql/atomicupdate/bug_28844.pl >new file mode 100755 >index 00000000000..fbb87b9360b >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_28844.pl >@@ -0,0 +1,18 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "28844", >+ description => "Link orders and suggestions", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ unless ( column_exists('aqorders', 'suggestionid') ) { >+ $dbh->do(q{ >+ ALTER TABLE aqorders >+ ADD COLUMN `suggestionid` int(11) DEFAULT NULL COMMENT 'links this order line to a suggestion (suggestion.suggestionid)' AFTER subscriptionid, >+ ADD CONSTRAINT `aqorders_suggestionid` FOREIGN KEY (`suggestionid`) REFERENCES `suggestions` (`suggestionid`) ON DELETE SET NULL ON UPDATE CASCADE >+ }); >+ say $out "Added column 'aqorders.suggestionid'"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 8c05d11cd92..8594f0dbe96 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -727,6 +727,7 @@ CREATE TABLE `aqorders` ( > `sort2_authcat` varchar(10) DEFAULT NULL, > `uncertainprice` tinyint(1) DEFAULT NULL COMMENT 'was this price uncertain (1 for yes, 0 for no)', > `subscriptionid` int(11) DEFAULT NULL COMMENT 'links this order line to a subscription (subscription.subscriptionid)', >+ `suggestionid` int(11) DEFAULT NULL COMMENT 'links this order line to a suggestion (suggestion.suggestionid)', > `parent_ordernumber` int(11) DEFAULT NULL COMMENT 'ordernumber of parent order line, or same as ordernumber if no parent', > `orderstatus` varchar(16) DEFAULT 'new' COMMENT 'the current status for this line item. Can be ''new'', ''ordered'', ''partial'', ''complete'' or ''cancelled''', > `line_item_id` varchar(35) DEFAULT NULL COMMENT 'Supplier''s article id for Edifact orderline', >@@ -754,7 +755,8 @@ CREATE TABLE `aqorders` ( > CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT `aqorders_ibfk_3` FOREIGN KEY (`invoiceid`) REFERENCES `aqinvoices` (`invoiceid`) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT `aqorders_invoice_currency` FOREIGN KEY (`invoice_currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL, >- CONSTRAINT `aqorders_subscriptionid` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`) ON DELETE CASCADE ON UPDATE CASCADE >+ CONSTRAINT `aqorders_subscriptionid` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT `aqorders_suggestionid` FOREIGN KEY (`suggestionid`) REFERENCES `suggestions` (`suggestionid`) ON DELETE SET NULL ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; > >-- >2.25.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 28844
:
151001
|
151002
|
151003
|
151004
|
151005
|
151006
|
151007
|
153157
|
153158
|
153159
|
153160
|
153161
|
153162
|
153163
|
153174
|
153175
|
153176
|
158982
|
158983
|
158984
|
158985
|
158986
|
158987
|
158988
|
158989
|
158990
|
159759
|
159760
|
159761
|
159762
|
159763
|
159764
|
159765
|
159766
|
159767
|
159768