Squid url redirector

Diff
anonymous

Diff

Differences From Artifact [c2219a89ef]:

To Artifact [99d7edbc00]:


132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
	id_tag smallint NOT NULL
);

ALTER TABLE ONLY rules
	ADD CONSTRAINT rules_pkey PRIMARY KEY (netmask);

-- table to hold site arrays
-- maybe full original domain should be added with trigger to leave tripdomain function away
CREATE TABLE site (
	id_site serial,
	site text[] NOT NULL,
	domain not null
);

ALTER TABLE ONLY site
	ADD CONSTRAINT site_id PRIMARY KEY (id_site);

CREATE UNIQUE INDEX site_s ON site USING btree (site);








<


|
<







132
133
134
135
136
137
138

139
140
141

142
143
144
145
146
147
148
	id_tag smallint NOT NULL
);

ALTER TABLE ONLY rules
	ADD CONSTRAINT rules_pkey PRIMARY KEY (netmask);

-- table to hold site arrays

CREATE TABLE site (
	id_site serial,
	site text[] NOT NULL

);

ALTER TABLE ONLY site
	ADD CONSTRAINT site_id PRIMARY KEY (id_site);

CREATE UNIQUE INDEX site_s ON site USING btree (site);

171
172
173
174
175
176
177


178
179
180
181
182
183
184
	regex text
);

ALTER TABLE ONLY urls
	ADD CONSTRAINT urls_pkey PRIMARY KEY (date_added);

CREATE UNIQUE INDEX urls_id_site ON urls USING btree (id_site);



-- rule to join all tables into one to simplify access
-- automaticall uses current day and time data
CREATE VIEW site_rule AS
SELECT a.redirect_url, a.netmask, b.site, b.regexp
FROM ((
	SELECT rules.redirect_url, tag.tag AS rule_tag, rules.netmask







>
>







169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
	regex text
);

ALTER TABLE ONLY urls
	ADD CONSTRAINT urls_pkey PRIMARY KEY (date_added);

CREATE UNIQUE INDEX urls_id_site ON urls USING btree (id_site);

CREATE UNIQUE INDEX urls_id_tag ON urls USING btree (id_tag);

-- rule to join all tables into one to simplify access
-- automaticall uses current day and time data
CREATE VIEW site_rule AS
SELECT a.redirect_url, a.netmask, b.site, b.regexp
FROM ((
	SELECT rules.redirect_url, tag.tag AS rule_tag, rules.netmask