Bug 23346 - Add without-db-name parameter to koha-dump
Summary: Add without-db-name parameter to koha-dump
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-19 10:23 UTC by Marcel de Rooy
Modified: 2021-06-14 21:28 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement is the first step in allowing a koha database dump file to be restored into another koha instance. One can now pass the `--without-db-name` option to `koha-dump` to attain a zipped sql dump with no longer contains the `CREATE DATABASE` and `USE` statements within the restore file.
Version(s) released in:
19.11.00


Attachments
Bug 23346: Add without-db-name parameter to koha-dump (2.00 KB, patch)
2019-07-19 10:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23346: Add without-db-name parameter to koha-dump (2.04 KB, patch)
2019-09-06 10:42 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 23346: Add without-db-name parameter to koha-dump (2.08 KB, patch)
2019-10-18 12:52 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2019-07-19 10:23:52 UTC
See also bug 15664
Comment 1 Marcel de Rooy 2019-07-19 10:28:54 UTC
Created attachment 91628 [details] [review]
Bug 23346: Add without-db-name parameter to koha-dump

Test plan:
Run koha-dump [yourdb]. Rename the files in var/spool/koha/[yourdb]
Run koha-dump --without-db-name [yourdb]
Run a diff between the unzipped sql files. The last dump should not
contain a CREATE DATABASE and USE statement. See BZ 15664 c4.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Kyle M Hall 2019-09-06 10:42:11 UTC
Created attachment 92629 [details] [review]
Bug 23346: Add without-db-name parameter to koha-dump

Test plan:
Run koha-dump [yourdb]. Rename the files in var/spool/koha/[yourdb]
Run koha-dump --without-db-name [yourdb]
Run a diff between the unzipped sql files. The last dump should not
contain a CREATE DATABASE and USE statement. See BZ 15664 c4.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Martin Renvoize 2019-10-18 12:52:08 UTC
Created attachment 94410 [details] [review]
Bug 23346: Add without-db-name parameter to koha-dump

Test plan:
Run koha-dump [yourdb]. Rename the files in var/spool/koha/[yourdb]
Run koha-dump --without-db-name [yourdb]
Run a diff between the unzipped sql files. The last dump should not
contain a CREATE DATABASE and USE statement. See BZ 15664 c4.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2019-10-21 09:04:39 UTC
Nice work!

Pushed to master for 19.11.00