Bugzilla – Attachment 28141 Details for
Bug 8836
Resurrect Rotating Collections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8836 - Resurrect Rotating Collections - Followup 5 - Link collections.colBranchcode to branches.branchcode
Bug-8836---Resurrect-Rotating-Collections---Follow.patch (text/plain), 2.32 KB, created by
Kyle M Hall (khall)
on 2014-05-09 15:02:53 UTC
(
hide
)
Description:
Bug 8836 - Resurrect Rotating Collections - Followup 5 - Link collections.colBranchcode to branches.branchcode
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-05-09 15:02:53 UTC
Size:
2.32 KB
patch
obsolete
>From d1fe1d6495e52053ef71714833ecf6ca34fa98b7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 9 May 2014 11:00:10 -0400 >Subject: [PATCH] Bug 8836 - Resurrect Rotating Collections - Followup 5 - Link collections.colBranchcode to branches.branchcode > >--- > installer/data/mysql/kohastructure.sql | 8 +++++++- > installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ > 2 files changed, 23 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 92ab713..24bc4b7 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -479,11 +479,17 @@ CREATE TABLE collections ( > colId integer(11) NOT NULL auto_increment, > colTitle varchar(100) NOT NULL DEFAULT '', > colDesc text NOT NULL, >- colBranchcode varchar(4) DEFAULT NULL comment 'branchcode for branch where item should be held.', >+ colBranchcode varchar(10) DEFAULT NULL, -- 'branchcode for branch where item should be held.' > PRIMARY KEY (colId) > ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8; > > -- >+-- Constraints for table `collections` >+-- >+ALTER TABLE `collections` >+ ADD CONSTRAINT `collections_ibfk_1` FOREIGN KEY (`colBranchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE; >+ >+-- > -- Table: collections_tracking > -- > DROP TABLE IF EXISTS collections_tracking; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 3b1718c..cb57d32 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8465,6 +8465,22 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.17.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q{ >+ ALTER TABLE collections CHANGE colBranchcode colBranchcode VARCHAR( 10 ) NULL DEFAULT NULL >+ }); >+ $dbh->do(q{ >+ ALTER TABLE collections ADD INDEX ( colBranchcode ) >+ }); >+ $dbh->do(q{ >+ ALTER TABLE collections >+ ADD CONSTRAINT collections_ibfk_1 FOREIGN KEY (colBranchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE >+ }); >+ print "Upgrade to $DBversion done (Bug 8836 - Resurrect Rotating Collections)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.2.5
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 8836
:
12560
|
16746
|
19118
|
19119
|
19337
|
19339
|
21008
|
21009
|
21010
|
21011
|
23966
|
23967
|
23968
|
23969
|
23970
|
23971
|
23976
|
28140
|
28141
|
30838
|
30921
|
31087
|
32361
|
32362
|
32588
|
32589
|
32690
|
32691
|
32693
|
32773
|
32774
|
32973
|
32974
|
32975
|
32976
|
32994
|
32999
|
33000
|
33001
|
33002
|
33045
|
33046
|
33047
|
33048
|
33050
|
33051
|
33058
|
33059
|
33060
|
33061
|
33062
|
33063
|
33064
|
33065
|
33066
|
33068
|
33070
|
33095
|
33096
|
33097
|
33098
|
33099
|
33100
|
33101
|
33102
|
33103
|
33330
|
33331
|
33374