Bug 10965 - Sample itemtypes can't load on new install
Summary: Sample itemtypes can't load on new install
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Bernardo Gonzalez Kriegel
QA Contact: Testopia
URL:
Keywords:
Depends on: 10513
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-28 19:44 UTC by Bernardo Gonzalez Kriegel
Modified: 2014-05-26 21:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10965 - Sample itemtypes can't load on new install (2.27 KB, patch)
2013-09-28 19:46 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 10965 - Sample itemtypes can't load on new install (2.33 KB, patch)
2013-09-29 04:39 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 10965 - Sample itemtypes can't load on new install (2.50 KB, patch)
2013-09-29 16:27 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Bernardo Gonzalez Kriegel 2013-09-28 19:44:01 UTC
Sample itemtypes can't load with new itemtypes table structure.
Comment 1 Bernardo Gonzalez Kriegel 2013-09-28 19:46:32 UTC Comment hidden (obsolete)
Comment 2 I'm just a bot 2013-09-29 04:31:39 UTC
Patch applied cleanly, go forth and signoff
Comment 3 Chris Cormack 2013-09-29 04:39:33 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2013-09-29 16:23:03 UTC
I think we need follow-ups to fix the translated installers as well.
Comment 5 Katrin Fischer 2013-09-29 16:27:57 UTC
Created attachment 21597 [details] [review]
[PASSED QA] Bug 10965 - Sample itemtypes can't load on new install

Bug 10513 added two columns to table itemtypes,
but sample_itemtypes can't be loaded because
it relies on old structure.

This patch rewrites sample_itemtypes.sql, stating
explicitly columns, removing backticks and consolidates
all in one insertion.

To test:
1) On master with current DB structure, delete item types

2) try loading sample_itemtyes.sql
It fails with "ERROR 1136 (21S01) at line 1: Column count doesn't match value count at row 1"

3) apply patch

4) try again, this time it will load and itemtypes created

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
SQL change only.
Tested by running the web installer on an empty database.
All sample data loads without errors.
Comment 6 Katrin Fischer 2013-09-29 16:40:42 UTC
Working on a follow-up for translated installers.
Comment 7 Bernardo Gonzalez Kriegel 2013-09-29 17:33:03 UTC
(In reply to Katrin Fischer from comment #6)
> Working on a follow-up for translated installers.

If you like I can do this. Somehow I forget other languages :)
Comment 8 Katrin Fischer 2013-09-29 17:34:56 UTC
Already done - bug 10969 :)
Comment 9 Galen Charlton 2013-10-02 14:36:45 UTC
Pushed to master.  Thanks, Bernardo!