This tool allow manage the patches stored with db-patch (through the option –enable-historic).
The meta-information about patches is stored in a SQLite database (by default placed in ~/.db-patch/historical.sqlite). The physical patches executed (provided by the option -f) are copied by default are copied into ~/.db-patch/patches, and the SQL generated is stored by default in ~/.db-patch/sqls.
Note that to make a backup of the historical is very simple; Only it is necessary copy the directory that store the SQLite database and the patches.
These default values could be customized using a configuration file. For use a configuration file for db-patch it is necessary to use the option –history-cfg; for use a configuration file for db-patch-history it is necessary to use the option -c. Next it is shown a configuration file example.
[historical_db]
# Base path for store the database, the patches and the SQL generated
base_path = ~/.db-patch
# SQLite db name to store historical entries
db_name = historical.sqlite
# Relative path to base_path where the patches will be stored
patch_path = patches
# Relative path to base_path where the SQL generated will be stored
sql_path = sqls
db-patch-history
db-patch-history [options]
This program allow manage the database that store the patches applied with db-patch.
The database used by default (located in ~/.db-patch/db) can be customized providing a configuration file.
It is mandatory provide a query (-q option). The section QUERIES explain all the command queries. Note that the delete operations delete the full entry. That is, remove the entry, the patch, and the generated SQL.
db-patch-history -q “list all”
db-patch-history -q “export 12 13 14 ~/output_dir”
db-patch-history -q “see 24”
db-patch-history -q “list since 2013-12-31”
db-patch-history -q “delete between 10 123”
db-patch-history -q “delete until 2013-12-31”
db-patch
Miguel A. Martínez Pinedo <miguel.mpinedo@gmail.com>
Wrote this manpage for the Debian system.
Copyright (C) 2013 Miguel A. Martinez Pinedo
This manual page was written for the Debian system (and may be used by others).
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or (at your option) any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-3.