Bugzilla – Attachment 75491 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.33 KB, created by
Andrew Isherwood
on 2018-05-23 14:07:21 UTC
(
hide
)
Description:
Bug 20772: Add 'illrequestattributes.readonly'
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2018-05-23 14:07:21 UTC
Size:
2.33 KB
patch
obsolete
>From d55306a8a8ebc26cc4f6d5a3ffc16630d416b060 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' >--- > .../bug_20772-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 909eda25aa..aac79ac6c1 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4151,7 +4151,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.11.0
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