Bugzilla – Attachment 80566 Details for
Bug 20772
Make request metadata editable and add price_paid field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20772: Add 'illrequestattributes.readonly'
Bug-20772-Add-illrequestattributesreadonly.patch (text/plain), 2.47 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-10-13 11:26:31 UTC
(
hide
)
Description:
Bug 20772: Add 'illrequestattributes.readonly'
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-10-13 11:26:31 UTC
Size:
2.47 KB
patch
obsolete
>From 6f601468dca79f185fc7ac4d63868c6b504f8668 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Thu, 17 May 2018 09:22:03 +0100 >Subject: [PATCH] Bug 20772: Add 'illrequestattributes.readonly' > >This patch adds a 'readonly' column to illrequestattributes. On a DB >upgrade it also populates all existing rows with 1, indicating 'read >only' > >Signed-off-by: Barry Cannon <bc@interleaf.ie> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > ...772-add-readonly-flag-to-illrequestattributes.perl | 11 +++++++++++ > installer/data/mysql/kohastructure.sql | 3 ++- > 2 files changed, 13 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl b/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl >new file mode 100644 >index 0000000000..ab64c158be >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl >@@ -0,0 +1,11 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ if( !column_exists( 'illrequestattributes', 'readonly' ) ) { >+ $dbh->do( "ALTER TABLE illrequestattributes ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1" ); >+ $dbh->do( "UPDATE illrequestattributes SET readonly = 1" ); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly column)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index f086cbe6ae..d01b2cb062 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4176,7 +4176,8 @@ DROP TABLE IF EXISTS `illrequestattributes`; > CREATE TABLE illrequestattributes ( > illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number > type varchar(200) NOT NULL, -- API ILL property name >- value MEDIUMTEXT NOT NULL, -- API ILL property value >+ value MEDIUMTEXT NOT NULL, -- API ILL property value >+ readonly tinyint(1) NOT NULL DEFAULT 1, -- Is this attribute read only > PRIMARY KEY (`illrequest_id`, `type` (191)), > CONSTRAINT `illrequestattributes_ifk` > FOREIGN KEY (illrequest_id) >-- >2.19.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 20772
:
75491
|
75492
|
75493
|
75494
|
75495
|
75496
|
75497
|
75563
|
77230
|
77231
|
77232
|
77233
|
77234
|
77235
|
77236
|
77237
|
80010
|
80011
|
80012
|
80013
|
80014
|
80015
|
80016
|
80017
|
80027
|
80028
|
80029
|
80030
|
80031
|
80032
|
80033
|
80034
|
80035
|
80036
|
80037
|
80039
|
80041
|
80042
|
80043
|
80044
|
80045
|
80046
|
80051
|
80232
| 80566 |
80567
|
80568
|
80569
|
80570
|
80571
|
80572
|
80573
|
80574
|
80575
|
80576
|
80577