<div dir="ltr">I should also mention, I'm using this with a postgres db, so the schema install would be from the postgres definition/scripts.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 12:50 PM, Bobby Smith <span dir="ltr"><<a href="mailto:bobby.smith@gmail.com" target="_blank">bobby.smith@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Greetings,</div><div><br>I'm trying to migrate an opensips 1.7 install to 1.9. In the process, I noticed the drouting tables have changed a good bit.</div>
<div><br></div>After the schema was changed in 1.8 for the drouting module, this is a description of the new dr_gateways table (at the bottom).<div>
<br>My question is: there is now a "id" column, which is what i'd expect, and a gwid column, which is a varchar type that's not a sequence, not unique, but cannot be null. What is this column used for?<br>
<br>I noticed opensips 1.7, there is just a gwid column, which is an int with a sequence, which is what I expected. Is this just a way to carry that over with a db migration to 1.8 without having collisions on the sequence? So that new id's are generated, leaving this column essentially deprecated?<br>
<br>If so, why make it not null?<br><div><div><br></div><div><div>opensips=# \d dr_gateways;</div><div> Table "public.dr_gateways"</div><div> Column | Type | Modifiers </div>
<div>-------------+------------------------+----------------------------------------------------------</div><div> id | integer | not null default nextval('dr_gateways_id_seq'::regclass)</div>
<div> gwid | character varying(64) | not null</div><div> type | integer | not null default 0</div><div> address | character varying(128) | not null</div><div> strip | integer | not null default 0</div>
<div> pri_prefix | character varying(16) | default NULL::character varying</div><div> attrs | character varying(255) | default NULL::character varying</div><div> probe_mode | integer | not null default 0</div>
<div> description | character varying(128) | not null default ''::character varying</div><div>Indexes:</div><div> "dr_gateways_pkey" PRIMARY KEY, btree (id)</div><div> "dr_gateways_dr_gw_idx" UNIQUE, btree (gwid)</div>
</div><div><br></div><div>Thanks,</div><div><br></div></div></div></div>
</blockquote></div><br></div>