DROP TABLE server;

create table server (
	rec_id		int not null auto_increment primary key,
	active		int		not null	default 0,
	url		varchar(128)	not null	default '',
	period		int		not null	default 604800,
	tag		varchar(11)	not null	default '',
	category	varchar(11)	not null	default '',
	charset		varchar(16)	not null	default '',
	lang		varchar(2)	not null	default '',
	basic_auth	varchar(64)	not null	default '',
	proxy		varchar(64)	not null	default '',
	proxy_port	int		not null	default 3128,
	proxy_auth	varchar(64)	not null	default '',

	maxhops		int		not null	default 9999,
	gindex		int		not null	default 1,
	follow		int		not null	default 1,
	deletebad	int		not null	default 0,
	use_robots	int		not null	default 1,
	delete_no_srv	int		not null	default 1,
	use_clones	int		not null	default 1,

	descweight	int		not null	default 2,
	keywordweight	int		not null	default 2,
	titleweight	int		not null	default 2,
	bodyweight	int		not null	default 1,
	urlweight	int		not null	default 0,
	urlhostweight	int		not null	default 0,
	urlpathweight	int		not null	default 0,
	urlfileweight	int		not null	default 0,
	correct_factor	int		not null	default 1,
	incorrect_factor int		not null	default 1,
	number_factor	int		not null	default 1,
	alnum_factor	int		not null	default 1,

	max_net_errors	int		not null	default 16,
	net_delay_time	int		not null	default 86400,
	read_timeout	int		not null	default 90

);

CREATE UNIQUE INDEX srv_url ON server (url);

INSERT INTO server
	(active,url,period,tag,category,charset,lang,basic_auth,
	proxy,proxy_port,proxy_auth,
	maxhops,gindex,follow,deletebad,use_robots,delete_no_srv,use_clones,
	descweight,keywordweight,titleweight,bodyweight,
	urlweight,urlhostweight,urlpathweight,urlfileweight,
	correct_factor,incorrect_factor,number_factor,alnum_factor,
	max_net_errors,net_delay_time,read_timeout)
VALUES
	(1,'http://web.izhcom.ru/',60000,'TT','AA','koi8-r','ru','',
	'',3128,'',
	1000,1,1,0,1,1,1,
	2,2,2,1,
	0,0,0,0,
	1,1,1,1,
	100,3600,60);

INSERT INTO server
	(active,url,period,tag,category,charset,lang,basic_auth,
	proxy,proxy_port,proxy_auth,
	maxhops,gindex,follow,deletebad,use_robots,delete_no_srv,use_clones,
	descweight,keywordweight,titleweight,bodyweight,
	urlweight,urlhostweight,urlpathweight,urlfileweight,
	correct_factor,incorrect_factor,number_factor,alnum_factor,
	max_net_errors,net_delay_time,read_timeout)
VALUES
	(1,'http://www.udmnet.ru/',60000,'GG','BB','koi8-r','ru','',
	'',3128,'',
	1000,1,1,0,1,1,1,
	2,2,2,1,
	0,0,0,0,
	1,1,1,1,
	100,3600,60);
