Bug 12486

Summary: Appendix G (Resetting the Koha Database) using DELETE instead of TRUNCATE
Product: Koha Reporter: Pablo AB <pablo.bianchi>
Component: DocumentationAssignee: Nicole C. Engard <nengard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: katrin.fischer
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

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.