Bugzilla – Attachment 93446 Details for
Bug 13881
Add ability to defined circulation desks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13881: kohastructure and atomic update
Bug-13881-kohastructure-and-atomic-update.patch (text/plain), 3.92 KB, created by
Nicolas Legrand
on 2019-10-02 12:36:04 UTC
(
hide
)
Description:
Bug 13881: kohastructure and atomic update
Filename:
MIME Type:
Creator:
Nicolas Legrand
Created:
2019-10-02 12:36:04 UTC
Size:
3.92 KB
patch
obsolete
>From 7878c90df3d3f953c8b1b9c440249df26fa8ba87 Mon Sep 17 00:00:00 2001 >From: Nicolas Legrand <nicolas.legrand@bulac.fr> >Date: Wed, 2 Oct 2019 14:25:50 +0200 >Subject: [PATCH] Bug 13881: kohastructure and atomic update > >--- > .../atomicupdate/bug_13881_create_desks_table.perl | 16 ++++++++++++++++ > installer/data/mysql/kohastructure.sql | 17 ++++++++++++++++- > 2 files changed, 32 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl b/installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl >new file mode 100644 >index 0000000..21559f8 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl >@@ -0,0 +1,16 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(qq{ >+ CREATE TABLE desks ( -- authorized values for desks available in a Library >+ desk_id int(11) NOT NULL auto_increment, -- unique identifier added by Koha >+ desk_name varchar(100) NOT NULL default '', -- name of the desk >+ branchcode varchar(10) NOT NULL, -- Library the desk is located into >+ PRIMARY KEY (desk_id), >+ KEY `fk_desks_branchcode` (branchcode), >+ CONSTRAINT `fk_desks_branchcode` FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ >+ }); >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 13881 - Add desk management)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index aa5817d..6e31c0e 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -373,6 +373,20 @@ CREATE TABLE `cities` ( -- authorized values for cities/states/countries to choo > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >+-- Table structure for table desks >+-- >+ >+DROP TABLE IF EXISTS desks; >+CREATE TABLE desks ( -- authorized values for desks available in a Library >+ desk_id int(11) NOT NULL auto_increment, -- unique identifier >+ desk_name varchar(100) NOT NULL default '', -- name of the desk >+ branchcode varchar(10) NOT NULL, -- Library the desk is located into >+ PRIMARY KEY (desk_id), >+ KEY `fk_desks_branchcode` (branchcode), >+ CONSTRAINT `fk_desks_branchcode` FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ >+-- > -- Table structure for table `class_sort_rules` > -- > >@@ -1828,7 +1842,7 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha > CONSTRAINT `reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, >- CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE >+ CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE, > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >@@ -1871,6 +1885,7 @@ CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b > ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) > ON DELETE SET NULL ON UPDATE SET NULL >+ ON DELETE SET NULL ON UPDATE SET NULL > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >-- >2.1.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 13881
:
37808
|
39837
|
40186
|
40569
|
40709
|
40895
|
41233
|
42804
|
43664
|
93445
|
93446
|
93447
|
93452
|
93453
|
93454
|
95287
|
95288
|
95289
|
95293
|
95294
|
95295
|
101033
|
101050
|
101064
|
101065
|
101479
|
101543
|
101544
|
101545
|
101546
|
101547
|
105009