Hi, 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.
Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 10/28/2013 06:18 PM, Bobby Smith wrote: > I got it, it's actually the string you can use to identify just a > single carrier from script functions. > > 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'. > > Thanks for the help, > > > On Fri, Oct 25, 2013 at 7:40 PM, Aaron Seelye > <[email protected] <mailto:[email protected]>> wrote: > > 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. > > -Aaron > > > On 10/25/2013 9:50 AM, Bobby Smith wrote: > > Greetings, > > 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. > > 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). > > 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? > > 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? > > If so, why make it not null? > > opensips=# \d dr_gateways; > Table "public.dr_gateways" > Column | Type | > Modifiers > > -------------+------------------------+---------------------------------------------------------- > id | integer | not null default > nextval('dr_gateways_id_seq'::regclass) > gwid | character varying(64) | not null > type | integer | not null default 0 > address | character varying(128) | not null > strip | integer | not null default 0 > pri_prefix | character varying(16) | default > NULL::character varying > attrs | character varying(255) | default > NULL::character varying > probe_mode | integer | not null default 0 > description | character varying(128) | not null default > ''::character > varying > Indexes: > "dr_gateways_pkey" PRIMARY KEY, btree (id) > "dr_gateways_dr_gw_idx" UNIQUE, btree (gwid) > > Thanks, > > > > _______________________________________________ > Users mailing list > [email protected] <mailto:[email protected]> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > [email protected] <mailto:[email protected]> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
