<p>The global <code>db_version_table</code> parameter has one big pitfall: all OpenSIPS tables <strong>must</strong> be created with <code>opensipsdbctl</code>. Although this is a solid/recommended way of installing OpenSIPS, real life sometimes imposes some restrictions. For example, some tables (dispatcher, drouting, etc.) may actually be SQL views of other platform-related tables.</p>

<p>When views / hand-made tables come in place, OpenSIPS is left <em>without any</em> real mechanism of validating its input table structure, leading to all sort of buggy behaviour, i.e. incorrectly balancing between dispatcher destinations (that show up in <code>fifo ds_list</code>) because the <em>state</em> field is <code>varchar(1)</code> instead of <code>int(11)</code>.</p>

<p>This feature request discussion aims at adding a new way of checking SQL tables, by validating the type of each column. It also has the side-effect of rendering the entire <code>db_version_table</code> mechanism useless. Please reply with feedback / ideas / further suggestions.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/671">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcia5CtABRke8slbcmtB-6yw_8tTEzks5o67NygaJpZM4GNIjh.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/671"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>