This dramatically speeds up the ngcp-update-db-schema process if
everything has been applied already or if just a few single
scripts have to be executed.
Execution times for old mode vs new (batch) mode with all present
scripts executed already:
| root@spce:~# time { /usr/sbin/ngcp-update-db-schema.orig >/dev/null ; }
|
| real 0m53.281s
| user 0m45.439s
| sys 0m5.100s
vs.
| root@spce:~# time /usr/sbin/ngcp-update-db-schema
| [ ok ] Starting MySQL database server: mysqld already running.
| Synchronizing passwords with MySQL
|
| real 0m4.096s
| user 0m1.812s
| sys 0m0.472s
The main behaviour of ngcp-check-rev-applied hasn't been changed,
it's backwards compatible (so also cfg-schema which uses
ngcp-check-rev-applied continues to work as it is), now it's just
possible to provide multiple arguments to the "--revision" option
and its output is parsed by ngcp-update-db-schema then.
This makes our 2.5 repos future proof as well.
To recap, that's the idea of the postinst file:
* nothing will be automatically executed on existing 2.5 ngcp systems
* nothing will be automatically executed on 2.5->2.6 ngcp upgrades
as soon as package version 2.6.4 (which will provide all the nessary
bugfixes) is available in the 2.6 repos
* if a system is running release 2.6 already then the system already
provides ngcp-db-schema >= 2.6.0 and <= 2.6.3, then the
ngcp-update-db-schema script will be executed automatically
From: Michael Prokop <mprokop@sipwise.com>
This is supposed to help us getting the broken
/usr/share/ngcp-db-schema/db_scripts/diff/9868.up
script into existing 2.6 systems.
Needs excessive testing, not ready for release *yet*.
From: Michael Prokop <mprokop@sipwise.com>
This makes reviews and diffs easier and helps in avoiding duplicate entries.
devscripts's wrap-and-sort ftw.
Closes: https://bugtracker.sipwise.com/view.php?id=1845
From: Michael Prokop <mprokop@sipwise.com>
We don't actually use anything inside it and the printed "TODO"
isn't really something which should be kept :)
From: Michael Prokop <mprokop@sipwise.com>