Bug 19422 - kohastructure.sql missing DROP TABLES
Summary: kohastructure.sql missing DROP TABLES
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: David Bourgault
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-06 13:15 UTC by David Bourgault
Modified: 2017-12-08 11:20 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19422 - Missing DROP TABLES in kohastructure.sql (1.62 KB, patch)
2017-10-06 13:19 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19422 - Missing DROP TABLES in kohastructure.sql (1.68 KB, patch)
2017-10-07 12:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19422 - Missing DROP TABLES in kohastructure.sql (1.77 KB, patch)
2017-10-13 07:44 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 19422: Make sure it will never happen again (1.88 KB, patch)
2017-10-13 16:41 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Bourgault 2017-10-06 13:15:09 UTC
kohastructure.sql is missing DROP TABLES (or IF NOT EXISTS ?) for the following tables : article_requests, biblio_metadata, deletedbiblio_metadata.
Comment 1 David Bourgault 2017-10-06 13:19:43 UTC
Created attachment 67705 [details] [review]
Bug 19422 - Missing DROP TABLES in kohastructure.sql

Adds DROP TABLE statements to the following tables
    - article_requests
    - biblio_metadata
    - deletedbiblio_metadata

Test plan :
Clean your database by running 'mysql < kohastructure.sql'.
Without patch you'll get error messages.
With patch everything will work fine, no warnings.
Comment 2 Katrin Fischer 2017-10-07 12:31:40 UTC
Created attachment 67781 [details] [review]
Bug 19422 - Missing DROP TABLES in kohastructure.sql

Adds DROP TABLE statements to the following tables
    - article_requests
    - biblio_metadata
    - deletedbiblio_metadata

Test plan :
Clean your database by running 'mysql < kohastructure.sql'.
Without patch you'll get error messages.
With patch everything will work fine, no warnings.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Marcel de Rooy 2017-10-13 07:44:38 UTC
Created attachment 68051 [details] [review]
Bug 19422 - Missing DROP TABLES in kohastructure.sql

Adds DROP TABLE statements to the following tables
    - article_requests
    - biblio_metadata
    - deletedbiblio_metadata

Test plan :
Clean your database by running 'mysql < kohastructure.sql'.
Without patch you'll get error messages.
With patch everything will work fine, no warnings.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Jonathan Druart 2017-10-13 16:41:41 UTC
Created attachment 68084 [details] [review]
Bug 19422: Make sure it will never happen again
Comment 5 Jonathan Druart 2017-10-13 17:01:23 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 6 Mirko Tietgen 2017-10-14 12:43:03 UTC
(In reply to Jonathan Druart from comment #4)
> Created attachment 68084 [details] [review] [review]
> Bug 19422: Make sure it will never happen again

This breaks packaging. From the nightly build log at https://apt.abunchofthings.net/koha-nightly/unstable-log.txt

read_file '/usr/share/koha/intranet/cgi-bin/installer/data/mysql/kohastructure.sql' - sysopen: No such file or directory at t/check_kohastructure.t line 22.
# Looks like your test exited with 2 before it could output anything.
t/check_kohastructure.t ............. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/1 subtests
Comment 7 Jonathan Druart 2017-10-23 14:32:52 UTC
Mirko, /usr/share/koha/intranet/cgi-bin/installer/data/mysql/kohastructure.sql does not exist? Where is it then?
Comment 8 Mirko Tietgen 2017-12-08 10:29:23 UTC
(In reply to Jonathan Druart from comment #7)
> Mirko,
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/kohastructure.sql does
> not exist? Where is it then?

This requires a full Koha installation, which is not expected when just building packages. The file is only available in $kohadev/installer/data/mysql/kohastructure.sql
Comment 9 Mirko Tietgen 2017-12-08 10:33:50 UTC
During build process there is

> cp installer/data/mysql/kohastructure.sql blib/INTRANET_CGI_DIR/installer/data/mysql/kohastructure.sql