<p>Neels Hofmeyr <strong>uploaded patch set #10</strong> to the change originally created by Stefan Sperling.</p><p><a href="https://gerrit.osmocom.org/11898">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add database schema versioning to the HLR database<br><br>Make use of pragma user_version to store our database schema version.<br>The present schema is now identitifed as 'version 0', which is also<br>the default value for databases on which we never ran the statement<br>'pragma user_version' before.<br><br>Only bootstrap the database if it hasn't been bootstrapped yet.<br>Previously, bootstrap SQL statements ran every time osmo-hlr<br>opened the database, and any errors were being ignored in SQL.<br>Instead, we now first run a query which checks whether tables<br>already exist, and only create them if necessary.<br>This change will allow future schema updates to work properly.<br><br>Prepare for future schema upgrades by adding a new command-line<br>option which enables upgrades. This option defaults to 'false'<br>in order to avoid accidental upgrades.<br><br>Change-Id: I8aeaa9a404b622657cbc7138106f38aa6ad8d01b<br>Related: OS#2838<br>---<br>M sql/hlr.sql<br>M src/db.c<br>M src/db.h<br>M src/hlr.c<br>M src/hlr_db_tool.c<br>M tests/db/db_test.c<br>6 files changed, 128 insertions(+), 25 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/98/11898/10</pre><p>To view, visit <a href="https://gerrit.osmocom.org/11898">change 11898</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11898"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I8aeaa9a404b622657cbc7138106f38aa6ad8d01b </div>
<div style="display:none"> Gerrit-Change-Number: 11898 </div>
<div style="display:none"> Gerrit-PatchSet: 10 </div>
<div style="display:none"> Gerrit-Owner: Stefan Sperling <ssperling@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Stefan Sperling <ssperling@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>