Main Koha release repository https://koha-community.org
Find a file
Jonathan Druart 006bae1b7f Bug 14069: Drop existing primary key on items if exists
On old databases, the issues table has a primary key on itemnumber.
The DBrev 3.19.00.028 (Bug 13790 - Add unique id issue_id to issues and
oldissues tables) has to remove it before adding the new primary key

Test plan:
1/ Make sure you have an old DB, or add primary key (issues.itemnumber)manually
on a DB created before 3.19.00.028.
2/ Execute the updatedatabase.pl script
3/ You should not get any error and the primary key on itemnumber should
have been removed and the new one created as expected.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors

Tested using a 3.4 db (3.0404000)
Interestingly, it gives a similar error on the same table but
on another (older $DBversion = "3.05.00.009";) update

1) Pre-patch, 3.4 DB, updatedatabase from master, errors
(older)
DBD::mysql::db do failed: Multiple primary key defined at installer/data/mysql/updatedatabase.pl line 4435.
(13790)
DBD::mysql::db do failed: Multiple primary key defined at installer/data/mysql/updatedatabase.pl line 10166.
DBD::mysql::db do failed: Unknown column 'issue_id' in 'order clause' at installer/data/mysql/updatedatabase.pl line 10170.
DBD::mysql::st execute failed: Unknown column 'me.issue_id' in 'field list' at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1593.
DBIx::Class::ResultSetColumn::max(): Unknown column 'me.issue_id' in 'field list' at installer/data/mysql/updatedatabase.pl line 10174

2) Post-patch, same conditions
(only older)
DBD::mysql::db do failed: Multiple primary key defined at installer/data/mysql/updatedatabase.pl line 4435.

There are other warnings, but nor related with keys.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-05-04 11:26:12 -03:00
acqui Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
admin Bug 1487: Store the "display only used tags/subf" value in a cookie 2015-04-30 15:23:01 -03:00
authorities Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
basket Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
C4 Bug 13887: Display the due date as a due date + sort on info 2015-05-04 11:24:07 -03:00
catalogue Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
cataloguing Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
circ Bug 4041: Third step - Display address on patron's pages using the system preference 2015-04-29 11:25:11 -03:00
course_reserves Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
debian Bug 7939: (QA followup) make the koha-translate script test the new filenames 2015-04-30 11:37:26 -03:00
docs Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
errors Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
etc Bug 8992: Add 7..$3 to the Indentifier-standard index 2015-04-28 15:47:40 -03:00
install_misc Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
installer Bug 14069: Drop existing primary key on items if exists 2015-05-04 11:26:12 -03:00
Koha Bug 8007: (RM followup) fix DBIx schema checksum 2015-04-30 12:34:12 -03:00
koha-tmpl Bug 13887: Display the due date as a due date + sort on info 2015-05-04 11:24:07 -03:00
labels Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
members Bug 8007: (QA followup) Add error handling when generating the pdf 2015-04-30 12:34:21 -03:00
misc Bug 13889: Add information about cron jobs to system log 2015-05-04 11:11:14 -03:00
offline_circ Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac Bug 7843: (QA followup) Make news selection persistant 2015-04-30 16:33:21 -03:00
OpenILS Bug 9239 QA follow-up: remove stray debug code 2013-03-16 21:32:34 -04:00
patron_lists Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
patroncards Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
plugins Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
reports Bug 13992: Software error in reports if field or table does not exist 2015-04-24 10:07:45 -03:00
reserve Bug 13887: Display the due date as a due date + sort on info 2015-05-04 11:24:07 -03:00
reviews Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
rotating_collections Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
selenium Adding selenium tests for filterMembers 2009-09-30 11:30:37 +02:00
serials Bug 11814: (follow-up) Use constants to describe statuses 2015-04-30 15:33:00 -03:00
services Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
skel Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
sms Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
suggestion Bug 10752: Alert the librarian if the suggestion has not been added 2015-04-28 15:11:42 -03:00
svc Bug 9528: Add delivery branch to the place hold display 2015-04-30 16:45:26 -03:00
t Bug 13889: Add unit tests 2015-05-04 11:11:32 -03:00
tags Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
test Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
tmp/modified_authorities
tools Bug 4041: Third step - Display address on patron's pages using the system preference 2015-04-29 11:25:11 -03:00
virtualshelves Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
xt Bug 13941: [1/2] Test <body> tag with id/class attributes 2015-04-24 09:47:28 -03:00
.editorconfig Bug 12545: Add EditorConfig.org file to the source tree 2014-08-22 11:07:45 -03:00
.htaccess Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
.mailmap Bug 13314: Follow-up for m.de.rooy in .mailmap 2014-11-26 11:16:18 -03:00
about.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
changelanguage.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
edithelp.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
fix-perl-path.PL Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
help.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
INSTALL Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
install-CPAN.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
INSTALL.debian Bug 8092 follow-up: Add optional dependency on CHI 2012-06-09 13:08:18 +02:00
INSTALL.fedora7 Bug 11757: remove dependency on POE 2014-02-15 01:38:15 +00:00
INSTALL.opensuse Bug 11757: remove dependency on POE 2014-02-15 01:38:15 +00:00
INSTALL.ubuntu Bug 7764: (follow-up) editorial tweaks 2013-10-04 16:27:55 +00:00
koha_perl_deps.pl bug 10548: fix count of missing required dependencies by koha_perl_deps.pl 2013-07-11 14:03:32 +00:00
kohaversion.pl Bug 13889: DBRev 3.19.00.036 2015-05-04 11:24:00 -03:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
mainpage.pl Bug 8007: Discharge - Glue 2015-04-30 12:33:53 -03:00
Makefile.PL Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.robots Bug 6411 add another example to README.robots 2011-07-05 14:48:05 +12:00
rewrite-config.PL Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00

Koha is a free software integrated library system.

Koha is distributed under the GNU GPL version 3 or later.
Please read the file LICENSE for more details.

To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.

Report bugs at http://bugs.koha-community.org/

Visit the Koha Project website at http://www.koha-community.org/