Hello Pau Espin Pedrol, Vadim Yanitskiy, Neels Hofmeyr, Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/11898
to look at the new patch set (#7).
Change subject: add database schema versioning to the HLR database
......................................................................
add database schema versioning to the HLR database
Make use of pragma user_version to store our database schema version.
The present schema is now identitifed as 'version 0', which is also
the default value for databases on which we never ran the statement
'pragma user_version' before.
Only bootstrap the database if it hasn't been bootstrapped yet.
Previously, bootstrap SQL statements ran every time osmo-hlr
opened the database, and any errors were being ignored in SQL.
Instead, we now first run a query which checks whether tables
already exist, and only create them if necessary.
This change will allow future schema updates to work properly.
Prepare for future schema upgrades by adding a new command-line
option which enables upgrades. This option defaults to 'false'
in order to avoid accidental upgrades.
Change-Id: I8aeaa9a404b622657cbc7138106f38aa6ad8d01b
Related: OS#2838
---
M sql/Makefile.am
M sql/hlr.sql
A sql/hlr_index.sql
M src/Makefile.am
M src/db.c
M src/db.h
R src/db_sql2c.sed
M src/hlr.c
M src/hlr_db_tool.c
M tests/db/db_test.c
10 files changed, 162 insertions(+), 33 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/98/11898/7
--
To view, visit https://gerrit.osmocom.org/11898
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8aeaa9a404b622657cbc7138106f38aa6ad8d01b
Gerrit-Change-Number: 11898
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Stefan Sperling <[email protected]>
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>