Bugzilla – Attachment 68542 Details for
Bug 7317
Add an Interlibrary Loan Module to Circulation and OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7317: Rewrite atomicupdate file
Bug-7317-Rewrite-atomicupdate-file.patch (text/plain), 7.64 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-10-25 18:35:24 UTC
(
hide
)
Description:
Bug 7317: Rewrite atomicupdate file
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-10-25 18:35:24 UTC
Size:
7.64 KB
patch
obsolete
>From 1bfe06bb27ef34453a651650812d72b4517296af Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 25 Oct 2017 15:34:34 -0300 >Subject: [PATCH] Bug 7317: Rewrite atomicupdate file > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../data/mysql/atomicupdate/bug_7317_ill.perl | 69 ++++++++++++++++++++++ > installer/data/mysql/atomicupdate/ill_tables.sql | 55 ----------------- > 2 files changed, 69 insertions(+), 55 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_7317_ill.perl > delete mode 100644 installer/data/mysql/atomicupdate/ill_tables.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_7317_ill.perl b/installer/data/mysql/atomicupdate/bug_7317_ill.perl >new file mode 100644 >index 0000000..56575d3 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_7317_ill.perl >@@ -0,0 +1,69 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ >+ if ( !TableExists( 'illrequests' ) ) { >+ $dbh->do(q{ >+ CREATE TABLE illrequests ( >+ illrequest_id serial PRIMARY KEY, -- ILL request number >+ borrowernumber integer DEFAULT NULL, -- Patron associated with request >+ biblio_id integer DEFAULT NULL, -- Potential bib linked to request >+ branchcode varchar(50) NOT NULL, -- The branch associated with the request >+ status varchar(50) DEFAULT NULL, -- Current Koha status of request >+ placed date DEFAULT NULL, -- Date the request was placed >+ replied date DEFAULT NULL, -- Last API response >+ updated timestamp DEFAULT CURRENT_TIMESTAMP -- Last modification to request >+ ON UPDATE CURRENT_TIMESTAMP, >+ completed date DEFAULT NULL, -- Date the request was completed >+ medium varchar(30) DEFAULT NULL, -- The Koha request type >+ accessurl varchar(500) DEFAULT NULL, -- Potential URL for accessing item >+ cost varchar(20) DEFAULT NULL, -- Cost of request >+ notesopac text DEFAULT NULL, -- Patron notes attached to request >+ notesstaff text DEFAULT NULL, -- Staff notes attached to request >+ orderid varchar(50) DEFAULT NULL, -- Backend id attached to request >+ backend varchar(20) DEFAULT NULL, -- The backend used to create request >+ CONSTRAINT `illrequests_bnfk` >+ FOREIGN KEY (`borrowernumber`) >+ REFERENCES `borrowers` (`borrowernumber`) >+ ON UPDATE CASCADE ON DELETE CASCADE, >+ CONSTRAINT `illrequests_bcfk_2` >+ FOREIGN KEY (`branchcode`) >+ REFERENCES `branches` (`branchcode`) >+ ON UPDATE CASCADE ON DELETE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+ }); >+ } >+ >+ if ( !TableExists( 'illrequestattributes' ) ) { >+ $dbh->do(q{ >+ CREATE TABLE illrequestattributes ( >+ illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number >+ type varchar(200) NOT NULL, -- API ILL property name >+ value text NOT NULL, -- API ILL property value >+ PRIMARY KEY (`illrequest_id`,`type`), >+ CONSTRAINT `illrequestattributes_ifk` >+ FOREIGN KEY (illrequest_id) >+ REFERENCES `illrequests` (`illrequest_id`) >+ ON UPDATE CASCADE ON DELETE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+ }); >+ } >+ >+ # System preferences >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES >+ ('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'); >+ }); >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES >+ ('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'); >+ }); >+ # userflags >+ $dbh->do(q{ >+ INSERT IGNORE INTO userflags (bit,flag,flagdesc,defaulton) VALUES >+ (22,'ill','The Interlibrary Loans Module',0); >+ }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 7317 - Add an Interlibrary Loan Module to Circulation and OPAC)\n"; >+} >diff --git a/installer/data/mysql/atomicupdate/ill_tables.sql b/installer/data/mysql/atomicupdate/ill_tables.sql >deleted file mode 100644 >index cab65f2..0000000 >--- a/installer/data/mysql/atomicupdate/ill_tables.sql >+++ /dev/null >@@ -1,55 +0,0 @@ >--- ILL Requests >- >-CREATE TABLE illrequests ( >- illrequest_id serial PRIMARY KEY, -- ILL request number >- borrowernumber integer DEFAULT NULL, -- Patron associated with request >- biblio_id integer DEFAULT NULL, -- Potential bib linked to request >- branchcode varchar(50) NOT NULL, -- The branch associated with the request >- status varchar(50) DEFAULT NULL, -- Current Koha status of request >- placed date DEFAULT NULL, -- Date the request was placed >- replied date DEFAULT NULL, -- Last API response >- updated timestamp DEFAULT CURRENT_TIMESTAMP -- Last modification to request >- ON UPDATE CURRENT_TIMESTAMP, >- completed date DEFAULT NULL, -- Date the request was completed >- medium varchar(30) DEFAULT NULL, -- The Koha request type >- accessurl varchar(500) DEFAULT NULL, -- Potential URL for accessing item >- cost varchar(20) DEFAULT NULL, -- Cost of request >- notesopac text DEFAULT NULL, -- Patron notes attached to request >- notesstaff text DEFAULT NULL, -- Staff notes attached to request >- orderid varchar(50) DEFAULT NULL, -- Backend id attached to request >- backend varchar(20) DEFAULT NULL, -- The backend used to create request >- CONSTRAINT `illrequests_bnfk` >- FOREIGN KEY (`borrowernumber`) >- REFERENCES `borrowers` (`borrowernumber`) >- ON UPDATE CASCADE ON DELETE CASCADE, >- CONSTRAINT `illrequests_bcfk_2` >- FOREIGN KEY (`branchcode`) >- REFERENCES `branches` (`branchcode`) >- ON UPDATE CASCADE ON DELETE CASCADE >-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >- >--- ILL Request Attributes >- >-CREATE TABLE illrequestattributes ( >- illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number >- type varchar(200) NOT NULL, -- API ILL property name >- value text NOT NULL, -- API ILL property value >- PRIMARY KEY (`illrequest_id`,`type`), >- CONSTRAINT `illrequestattributes_ifk` >- FOREIGN KEY (illrequest_id) >- REFERENCES `illrequests` (`illrequest_id`) >- ON UPDATE CASCADE ON DELETE CASCADE >-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >- >--- System preferences >- >-INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES >- ('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'); >- >-INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES >- ('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'); >- >--- Userflags >- >-INSERT INTO userflags (bit,flag,flagdesc,defaulton) >-VALUES (22,'ill','The Interlibrary Loans Module',0); >-- >2.7.4
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 7317
:
59893
|
59894
|
59895
|
59920
|
60485
|
60486
|
60487
|
60488
|
63081
|
63082
|
63083
|
63084
|
63085
|
63086
|
63087
|
63088
|
63089
|
63090
|
63113
|
63175
|
63176
|
63354
|
63421
|
63472
|
63475
|
65469
|
65470
|
65471
|
65472
|
65473
|
65474
|
65475
|
65476
|
66266
|
67242
|
67243
|
67244
|
67245
|
67246
|
67247
|
67248
|
67249
|
67250
|
67251
|
67252
|
67253
|
67254
|
67255
|
67256
|
67257
|
67258
|
67259
|
67260
|
67261
|
67262
|
67263
|
67264
|
67281
|
67282
|
67283
|
67284
|
67285
|
67286
|
67287
|
67288
|
67289
|
67290
|
67291
|
67292
|
67293
|
67294
|
67295
|
67296
|
67297
|
67298
|
67299
|
67300
|
67301
|
67302
|
67303
|
68185
|
68186
|
68328
|
68391
|
68406
|
68407
|
68408
|
68409
|
68418
|
68444
|
68445
|
68483
|
68484
|
68485
|
68487
|
68516
|
68517
|
68518
|
68519
|
68520
|
68521
|
68522
|
68523
|
68524
|
68525
|
68542
|
68543
|
68544
|
68545
|
68546
|
68547
|
68548
|
68549
|
68550
|
68551
|
68552
|
68558
|
68559
|
68560
|
68561
|
68562
|
68563
|
68564
|
68565
|
68566
|
68567
|
68858
|
68874
|
68877
|
68878
|
68885
|
68886
|
68921
|
68922
|
68926
|
68927
|
68928
|
68929
|
68931
|
68932
|
68933
|
68988
|
68989
|
68999
|
69000
|
69006
|
69008
|
69009
|
69012
|
69014
|
69044
|
69045
|
69046
|
69056
|
69059
|
69060
|
69061
|
69063
|
69064
|
69065
|
69066
|
69069
|
69070
|
69071
|
69074