Bugzilla – Attachment 64967 Details for
Bug 18231
Add the missing id-column to koha.issuingrules-table for DBIC fixtures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18231: Make sure we will not add the column twice
Bug-18231-Make-sure-we-will-not-add-the-column-twi.patch (text/plain), 2.10 KB, created by
Lari Taskula
on 2017-07-10 14:54:21 UTC
(
hide
)
Description:
Bug 18231: Make sure we will not add the column twice
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2017-07-10 14:54:21 UTC
Size:
2.10 KB
patch
obsolete
>From 68467d44edc312a1096552e79ada833759afdc4d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 17 Mar 2017 11:54:57 -0300 >Subject: [PATCH] Bug 18231: Make sure we will not add the column twice > >--- > .../mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.perl | 11 +++++++++++ > .../mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.sql | 3 --- > 2 files changed, 11 insertions(+), 3 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.perl > delete mode 100644 installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.sql > >diff --git a/installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.perl b/installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.perl >new file mode 100644 >index 0000000..8974137 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.perl >@@ -0,0 +1,11 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ unless ( column_exists( 'issuingrules', 'issuingrules_id' ) ) { >+ $dbh->do(q|ALTER TABLE `issuingrules` DROP PRIMARY KEY|); >+ $dbh->do(q|ALTER TABLE `issuingrules` ADD `issuingrules_id` INT( 11 ) NOT NULL auto_increment PRIMARY KEY FIRST|); >+ $dbh->do(q|ALTER TABLE `issuingrules` ADD CONSTRAINT UNIQUE `issuingrules_id` (`branchcode`,`categorycode`,`itemtype`)|); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 18231 - Add issuingrules.issuingrules_id)\n"; >+} >diff --git a/installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.sql b/installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.sql >deleted file mode 100644 >index a7cd8a7..0000000 >--- a/installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.sql >+++ /dev/null >@@ -1,3 +0,0 @@ >-ALTER TABLE `issuingrules` DROP PRIMARY KEY; >-ALTER TABLE `issuingrules` ADD `issuingrules_id` INT( 11 ) NOT NULL auto_increment PRIMARY KEY FIRST; >-ALTER TABLE `issuingrules` ADD CONSTRAINT UNIQUE `issuingrules_id` (`branchcode`,`categorycode`,`itemtype`); >-- >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 18231
:
60921
|
60955
|
60964
|
61102
|
61218
|
61219
|
64966
|
64967
|
64968
|
66969
|
66970
|
66971