Hello,
kamcli tool is a good candidate for such feature, it is python and quite
modular:
-
https://github.com/asipto/kamcli
Adding migrating db feature was one of my goals for this tool, but lack
of time didn't allow me to dig much into python, as I am not using this
programming language that often. Maybe others can jump on board and help
here.
Cheers,
Daniel
On 02/03/16 18:21, Tim Chubb wrote:
As a suggestion for 5.0 having a scripted DB migration system would
make upgrading much easier.
Something like what Asterisk now uses (Alembic
https://pypi.python.org/pypi/alembic) would be ideal, as it works in a
DB agnostic manner and you would just have to ensure that there is a
driver for the DB you wish to use.
That way you would just update the definition script and select the
target when you run the updater, and would allow kamailio a greater
choice in backing DB’s as once the script is written assuming a driver
is available for you RDBMS the schema would be successfully ported.
This would do away with maintaining separate MySQL, Postgres, Oracle,
MSSQL scripts as well.
The only issue I can think with a system like this is in the situation
where hardcoded SQL strings are in the source and use a RDBMS specific
function as that could cause some “fun” in debugging…
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, March 7-9, 2016 -
http://www.asipto.com