Bugzilla – Attachment 74964 Details for
Bug 18591
Allow an arbitrary number of comments on ILLs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18591 - Database updates
Bug-18591---Database-updates.patch (text/plain), 3.59 KB, created by
Magnus Enger
on 2018-05-02 12:51:26 UTC
(
hide
)
Description:
Bug 18591 - Database updates
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2018-05-02 12:51:26 UTC
Size:
3.59 KB
patch
obsolete
>From edd3a229bab8d65ad1f4d67b55b897a40a96e827 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Sat, 11 Nov 2017 14:02:22 +0000 >Subject: [PATCH] Bug 18591 - Database updates > >--- > .../mysql/atomicupdate/bug18591-ill-comments.perl | 26 ++++++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 22 ++++++++++++++++++ > 2 files changed, 48 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug18591-ill-comments.perl > >diff --git a/installer/data/mysql/atomicupdate/bug18591-ill-comments.perl b/installer/data/mysql/atomicupdate/bug18591-ill-comments.perl >new file mode 100644 >index 0000000..5742118 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug18591-ill-comments.perl >@@ -0,0 +1,26 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ unless (TableExists('illcomments')) { >+ $dbh->do(q{ >+ CREATE TABLE illcomments ( >+ illcomment_id int(11) NOT NULL AUTO_INCREMENT, -- Unique ID of the comment >+ illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number >+ borrowernumber integer DEFAULT NULL, -- Link to the user who made the comment (could be librarian, patron or ILL partner library) >+ comment text DEFAULT NULL, -- The text of the comment >+ timestamp timestamp DEFAULT CURRENT_TIMESTAMP, -- Date and time when the comment was made >+ PRIMARY KEY ( illcomment_id ), >+ CONSTRAINT illcomments_bnfk >+ FOREIGN KEY ( borrowernumber ) >+ REFERENCES borrowers ( borrowernumber ) >+ ON UPDATE CASCADE ON DELETE CASCADE, >+ CONSTRAINT illcomments_ifk >+ FOREIGN KEY (illrequest_id) >+ REFERENCES illrequests ( illrequest_id ) >+ ON UPDATE CASCADE ON DELETE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ }); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 18591 - Add comments to ILL requests)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 4b770d0..7c50ac0 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4161,6 +4161,28 @@ CREATE TABLE library_groups ( > UNIQUE KEY title ( title ) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >+-- >+-- Table structure for table illcomments >+-- >+ >+DROP TABLE IF EXISTS illcomments; >+CREATE TABLE illcomments ( >+ illcomment_id int(11) NOT NULL AUTO_INCREMENT, -- Unique ID of the comment >+ illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number >+ borrowernumber integer DEFAULT NULL, -- Link to the user who made the comment (could be librarian, patron or ILL partner library) >+ comment text DEFAULT NULL, -- The text of the comment >+ timestamp timestamp DEFAULT CURRENT_TIMESTAMP, -- Date and time when the comment was made >+ PRIMARY KEY ( illcomment_id ), >+ CONSTRAINT illcomments_bnfk >+ FOREIGN KEY ( borrowernumber ) >+ REFERENCES borrowers ( borrowernumber ) >+ ON UPDATE CASCADE ON DELETE CASCADE, >+ CONSTRAINT illcomments_ifk >+ FOREIGN KEY (illrequest_id) >+ REFERENCES illrequests ( illrequest_id ) >+ ON UPDATE CASCADE ON DELETE CASCADE >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >-- >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 18591
:
69234
|
69272
|
69273
|
69274
|
69275
|
74964
|
74965
|
74966
|
79518
|
79519
|
80077
|
80078
|
80079
|
80081
|
80084
|
80101
|
80102
|
80103
|
80104
|
80105
|
80227
|
80228
|
80229
|
80230