use island42;
drop table if exists log_type;

create table log_type (
  id int(11) NOT NULL primary key,
  log_method_id int(11) NOT NULL,
  log_type_category_id int(11) NOT NULL default '0',
  one_per_ip_per_day char(1) not null default 'f',
  name varchar(30) NOT NULL default ''
) type=InnoDB;

insert into log_type(id, log_method_id, name) values(1, 1, 'Page Request');
insert into log_type(id, log_method_id, name) values(2, 1, 'Search Engine Click Through');
insert into log_type(id, log_method_id, name) values(3, 1, 'Tradesman joined up');
insert into log_type(id, log_method_id, name) values(4, 1, 'Customer joined up');
insert into log_type(id, log_method_id, name) values(5, 1, 'Login');
insert into log_type(id, log_method_id, name) values(6, 1, 'Postcode Search');
insert into log_type(id, log_method_id, name) values(7, 1, 'Quote Accepted');
insert into log_type(id, log_method_id, name) values(8, 1, 'Quote Declined');
insert into log_type(id, log_method_id, name) values(9, 1, 'Recommendation Given');
insert into log_type(id, log_method_id, name) values(10, 1, 'Job Submitted');
insert into log_type(id, log_method_id, name) values(11, 1, 'Tradesman withdrawn');
insert into log_type(id, log_method_id, name) values(12, 1, 'Tradesman bad contact details');
insert into log_type(id, log_method_id, name) values(13, 1, 'Info pack sent');
insert into log_type(id, log_method_id, name) values(14, 1, 'Info pack with job sent');
insert into log_type(id, log_method_id, name) values(15, 1, 'Info pack click through');
insert into log_type(id, log_method_id, name) values(16, 1, 'Referral feedback left');
insert into log_type(id, log_method_id, name) values(17, 1, 'Job feedback left');
insert into log_type(id, log_method_id, name) values(18, 1, 'Search started');

insert into log_type(id, log_method_id, log_type_category_id, name, one_per_ip_per_day) values(19, 1, 1, 'Impression', 't');
insert into log_type(id, log_method_id, log_type_category_id, name, one_per_ip_per_day) values(20, 1, 1, 'Click Thru', 't');
insert into log_type(id, log_method_id, log_type_category_id, name) values(21, 1, 1, 'Sign up Customer');
insert into log_type(id, log_method_id, log_type_category_id, name) values(22, 1, 1, 'Sign up Tradesman');
insert into log_type(id, log_method_id, log_type_category_id, name) values(23, 1, 1, 'Payment Given');

insert into log_type(id, log_method_id, name) values(24, 1, 'Affiliate joined up');

insert into log_type(id, log_method_id, name) values(25, 1, 'Tradesman Application');
insert into log_type(id, log_method_id, name) values(26, 1, 'Tradesman Self-Activate');
insert into log_type(id, log_method_id, name) values(27, 1, 'Tradesman Click Through');

insert into log_type(id, log_method_id, log_type_category_id, name) values(28, 1, 2, 'SMS received');
insert into log_type(id, log_method_id, log_type_category_id, name) values(29, 1, 2, 'SMS quote accepted');
insert into log_type(id, log_method_id, log_type_category_id, name) values(30, 1, 2, 'SMS quote error');