Bugzilla – Attachment 45197 Details for
Bug 12772
Add item type and on-hold status to overdue notice/status triggers tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12772: Add back file so next patch does not fail
Bug-12772-Add-back-file-so-next-patch-does-not-fai.patch (text/plain), 3.35 KB, created by
Eivin Giske Skaaren
on 2015-11-26 19:12:36 UTC
(
hide
)
Description:
Bug 12772: Add back file so next patch does not fail
Filename:
MIME Type:
Creator:
Eivin Giske Skaaren
Created:
2015-11-26 19:12:36 UTC
Size:
3.35 KB
patch
obsolete
>From 27429fe028aea96008971cd3dc8eb635431713bf Mon Sep 17 00:00:00 2001 >From: Eivin Giske Skaaren <eivin@sysmystic.com> >Date: Thu, 26 Nov 2015 19:10:15 +0000 >Subject: [PATCH] Bug 12772: Add back file so next patch does not fail > >--- > .../update_13624_overduerules_transport_type.pl | 50 ++++++++++++++++++++ > 1 file changed, 50 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl > >diff --git a/installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl b/installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl >new file mode 100755 >index 0000000..be3af3c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl >@@ -0,0 +1,50 @@ >+#! /usr/bin/perl >+ >+use strict; >+use warnings; >+use C4::Context; >+my $dbh=C4::Context->dbh; >+ >+print "Will do : Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types\n"; >+ >+#if ( CheckVersion($DBversion) ) { >+ $dbh->do("SET FOREIGN_KEY_CHECKS=0"); >+ $dbh->do("ALTER TABLE overduerules RENAME old_overduerules"); >+ $dbh->do("CREATE TABLE overduerules ( >+ `overduerules_id` int(11) NOT NULL AUTO_INCREMENT, >+ `branchcode` varchar(10) NOT NULL DEFAULT '', >+ `categorycode` varchar(10) NOT NULL DEFAULT '', >+ `delay1` int(4) DEFAULT NULL, >+ `letter1` varchar(20) DEFAULT NULL, >+ `debarred1` varchar(1) DEFAULT '0', >+ `delay2` int(4) DEFAULT NULL, >+ `debarred2` varchar(1) DEFAULT '0', >+ `letter2` varchar(20) DEFAULT NULL, >+ `delay3` int(4) DEFAULT NULL, >+ `letter3` varchar(20) DEFAULT NULL, >+ `debarred3` int(1) DEFAULT '0', >+ PRIMARY KEY (`overduerules_id`), >+ UNIQUE KEY `overduerules_branch_cat` (`branchcode`,`categorycode`) >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); >+ $dbh->do("INSERT INTO overduerules(branchcode, categorycode, delay1, letter1, debarred1, delay2, debarred2, letter2, delay3, letter3, debarred3) SELECT * FROM old_overduerules"); >+ $dbh->do("DROP TABLE old_overduerules"); >+ $dbh->do("ALTER TABLE overduerules_transport_types >+ ADD COLUMN overduerules_id int(11) NOT NULL"); >+ my $mtts = $dbh->selectall_arrayref("SELECT * FROM overduerules_transport_types", { Slice => {} }); >+ $dbh->do("DELETE FROM overduerules_transport_types"); >+ $dbh->do("ALTER TABLE overduerules_transport_types >+ DROP FOREIGN KEY overduerules_fk, >+ ADD FOREIGN KEY overduerules_transport_types_fk (overduerules_id) REFERENCES overduerules (overduerules_id) ON DELETE CASCADE ON UPDATE CASCADE, >+ DROP COLUMN branchcode, >+ DROP COLUMN categorycode"); >+ my $s = $dbh->prepare("INSERT INTO overduerules_transport_types (overduerules_id, id, letternumber, message_transport_type) " >+ ." VALUES((SELECT overduerules_id FROM overduerules WHERE branchcode = ? AND categorycode = ?),?,?,?)"); >+ foreach my $mtt(@$mtts){ >+ $s->execute($mtt->{branchcode}, $mtt->{categorycode}, $mtt->{id}, $mtt->{letternumber}, $mtt->{message_transport_type} ); >+ } >+ $dbh->do("SET FOREIGN_KEY_CHECKS=1"); >+# print "Upgrade to $DBversion done (Bug 13624 - Remove columns branchcode, categorytype from table overduerules_transport_types)\n"; >+# SetVersion ($DBversion); >+#} >+ >+print "\nDone\n"; >-- >1.7.10.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 12772
:
41477
|
41478
|
41479
|
41480
|
41855
|
42126
|
45184
|
45185
|
45186
|
45187
|
45188
|
45189
|
45190
|
45191
|
45192
|
45193
|
45194
|
45195
|
45196
|
45197
|
45198
|
45199
|
45200
|
45201
|
45202
|
45203
|
45204
|
45544
|
45545
|
45546
|
45547
|
45548
|
45549
|
45550
|
45551
|
45552
|
56063
|
56077