alter table jin_emaildlv add delay int(3) not null default 0;
alter table jin_emaildlv add disabled int(1) not null default 0;

alter table jin_sale add funnel_splitpage_id int(11) not null default 0 after funnel_step_title;

update jin_sale s, jin_funnel_visit v set s.funnel_splitpage_id=v.splitpage_id where v.action='addproduct' and v.order_id!=0 and s.order_id=v.order_id and s.prod_id=v.param_id and s.funnel_splitpage_id=0;

create table jin_emaildlv_delayed
(
  id                  int(11) not null primary key auto_increment,
  tstamp_send         datetime null,  
  serialized          blob not null default '',
  key(tstamp_send)
);
