Bug 12486 - Appendix G (Resetting the Koha Database) using DELETE instead of TRUNCATE
Summary: Appendix G (Resetting the Koha Database) using DELETE instead of TRUNCATE
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Nicole C. Engard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-26 13:13 UTC by Pablo AB
Modified: 2015-10-27 14:26 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo AB 2014-06-26 13:13:03 UTC
Manual appendix G, "Resetting the Koha Database"[1] talks about resetting Koha database with TRUNCATE SQL command. As Robin Sheat[2] point me this is a deprecated way. Now, with MySQL >~5.5 the way is just:

 DELETE FROM biblio;

And the constraints will propagate the delete to (ALMOST) all other tables.

[1] http://manual.koha-community.org/3.16/en/resetkohadb.html
[2] http://lists.katipo.co.nz/public/koha/2014-June/039701.html

I'll fill another bug about updating also bulkmarcimport.pl -d option.
Comment 1 Pablo AB 2014-06-26 13:27:21 UTC
Related bug: #12488, "bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE"
Comment 3 Katrin Fischer 2014-11-09 22:51:12 UTC
reads ok to me :)
Comment 4 Pablo AB 2014-11-11 11:47:54 UTC
To me too :)

JFTR, been strict «DELETE FROM biblio;» not always do the task straightforward, in some scenarios you should remove first some dependencies (sadly, I don't now exactly whats.. if item is borrowed?).

PS: Same with bug #12488.