<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    <tt>Hi,<br>
      <br>
      Up to 1.7, the ID was a simple auto increment PK - this was human
      unfriendly and difficult to provision (as the ID would be
      generated by the DB, not up to the user). Starting with 1.8, the
      gwid took the role of primary key, but not auto-increment any more
      (user has not provide it) and expanded to string to be more
      friendly and easy to manage.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <br>
    On 10/28/2013 06:18 PM, Bobby Smith wrote:
    <blockquote
cite="mid:CAJQeEgtpgaC9y+jnR34r_XTVKE1xTSt9qVpAA8KZNZUTc-r0mg@mail.gmail.com"
      type="cite">
      <div dir="ltr">I got it, it's actually the string you can use to
        identify just a single carrier from script functions.
        <div><br>
        </div>
        <div>The name was just a bit confusing, because in the 1.7
          schema it was the pk id on the table, which has now been aptly
          renamed to just 'id'.</div>
        <div><br>
        </div>
        <div>Thanks for the help,</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Fri, Oct 25, 2013 at 7:40 PM, Aaron
          Seelye <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:aseelye-lists@eltopia.com" target="_blank">aseelye-lists@eltopia.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">My answer is mysql-influenced, but it's
            the id to which you're either defining the carrier gwlist,
            or the gwlist target in the rules.<br>
            <br>
            -Aaron
            <div>
              <div class="h5"><br>
                <br>
                On 10/25/2013 9:50 AM, Bobby Smith wrote:<br>
              </div>
            </div>
            <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
              0.8ex; border-left: 1px solid rgb(204, 204, 204);
              padding-left: 1ex;">
              <div>
                <div class="h5">
                  Greetings,<br>
                  <br>
                  I'm trying to migrate an opensips 1.7 install to 1.9.
                  &nbsp;In the process, I<br>
                  noticed the drouting tables have changed a good bit.<br>
                  <br>
                  After the schema was changed in 1.8 for the drouting
                  module, this is a<br>
                  description of the new dr_gateways table (at the
                  bottom).<br>
                  <br>
                  My question is: &nbsp;there is now a "id" column, which is
                  what i'd expect,<br>
                  and a gwid column, which is a varchar type that's not
                  a sequence, not<br>
                  unique, but cannot be null. &nbsp;What is this column used
                  for?<br>
                  <br>
                  I noticed opensips 1.7, there is just a gwid column,
                  which is an int<br>
                  with a sequence, which is what I expected. &nbsp;Is this
                  just a way to carry<br>
                  that over with a db migration to 1.8 without having
                  collisions on the<br>
                  sequence? &nbsp;So that new id's are generated, leaving
                  this column<br>
                  essentially deprecated?<br>
                  <br>
                  If so, why make it not null?<br>
                  <br>
                  opensips=# \d dr_gateways;<br>
                  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table
                  "public.dr_gateways"<br>
                  &nbsp; &nbsp; Column &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Type &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Modifiers<br>
                  -------------+------------------------+----------------------------------------------------------<br>
                  &nbsp; id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| integer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| not null
                  default<br>
                  nextval('dr_gateways_id_seq'::regclass)<br>
                  &nbsp; gwid &nbsp; &nbsp; &nbsp; &nbsp;| character varying(64) &nbsp;| not null<br>
                  &nbsp; type &nbsp; &nbsp; &nbsp; &nbsp;| integer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| not null
                  default 0<br>
                  &nbsp; address &nbsp; &nbsp; | character varying(128) | not null<br>
                  &nbsp; strip &nbsp; &nbsp; &nbsp; | integer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| not null
                  default 0<br>
                  &nbsp; pri_prefix &nbsp;| character varying(16) &nbsp;| default
                  NULL::character varying<br>
                  &nbsp; attrs &nbsp; &nbsp; &nbsp; | character varying(255) | default
                  NULL::character varying<br>
                  &nbsp; probe_mode &nbsp;| integer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| not null
                  default 0<br>
                  &nbsp; description | character varying(128) | not null
                  default ''::character<br>
                  varying<br>
                  Indexes:<br>
                  &nbsp; &nbsp; &nbsp;"dr_gateways_pkey" PRIMARY KEY, btree (id)<br>
                  &nbsp; &nbsp; &nbsp;"dr_gateways_dr_gw_idx" UNIQUE, btree (gwid)<br>
                  <br>
                  Thanks,<br>
                  <br>
                  <br>
                  <br>
                </div>
              </div>
              _______________________________________________<br>
              Users mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
              <br>
            </blockquote>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>