<!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"><<a moz-do-not-send="true"
href="mailto:aseelye-lists@eltopia.com" target="_blank">aseelye-lists@eltopia.com</a>></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.
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: 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. 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. Is this
just a way to carry<br>
that over with a db migration to 1.8 without having
collisions on the<br>
sequence? 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>
Table
"public.dr_gateways"<br>
Column | Type |
Modifiers<br>
-------------+------------------------+----------------------------------------------------------<br>
id | integer | not null
default<br>
nextval('dr_gateways_id_seq'::regclass)<br>
gwid | character varying(64) | not null<br>
type | integer | not null
default 0<br>
address | character varying(128) | not null<br>
strip | integer | not null
default 0<br>
pri_prefix | character varying(16) | default
NULL::character varying<br>
attrs | character varying(255) | default
NULL::character varying<br>
probe_mode | integer | not null
default 0<br>
description | character varying(128) | not null
default ''::character<br>
varying<br>
Indexes:<br>
"dr_gateways_pkey" PRIMARY KEY, btree (id)<br>
"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>