
michael@16: INSERT INTO version (table_name, table_version) values ('gw','8');
michael@16: CREATE TABLE gw (
michael@16:     id SERIAL PRIMARY KEY NOT NULL,
michael@16:     gw_name VARCHAR(128) NOT NULL,
michael@16:     grp_id INTEGER NOT NULL,
michael@16:     ip_addr VARCHAR(15) NOT NULL,
michael@16:     port SMALLINT,
michael@16:     uri_scheme SMALLINT,
michael@16:     transport SMALLINT,
michael@16:     strip SMALLINT,
michael@16:     tag VARCHAR(16) DEFAULT NULL,
michael@16:     flags INTEGER DEFAULT 0 NOT NULL,
michael@16:     CONSTRAINT gw_gw_name_idx UNIQUE (gw_name)
michael@16: );
michael@16: 
michael@16: CREATE INDEX gw_grp_id_idx ON gw (grp_id);
michael@16: 
michael@16: INSERT INTO version (table_name, table_version) values ('lcr','3');
michael@16: CREATE TABLE lcr (
michael@16:     id SERIAL PRIMARY KEY NOT NULL,
michael@16:     prefix VARCHAR(16) DEFAULT NULL,
michael@16:     from_uri VARCHAR(64) DEFAULT NULL,
michael@16:     grp_id INTEGER NOT NULL,
michael@16:     priority INTEGER NOT NULL
michael@16: );
michael@16: 
michael@16: CREATE INDEX lcr_prefix_idx ON lcr (prefix);
michael@16: CREATE INDEX lcr_from_uri_idx ON lcr (from_uri);
michael@16: CREATE INDEX lcr_grp_id_idx ON lcr (grp_id);
michael@16: 




