alter table jin_emaildlv add from_name varchar(255) not null default '' after title;
alter table jin_emaildlv add from_email varchar(255) not null default '' after from_name;

alter table jin_emaildlv modify message text not null default '';

update jin_user set adminlink_html='',adminlink_tstamp=null;

delete FROM `jin_template` where tmpl_type='tinymce_cfg';

alter table jin_sale add txn_waiting int(1) not null default 0 after txn_code;

alter table jin_emaildlv add anchor_code varchar(70) not null default '' after id;
create index anchor_code on jin_emaildlv(anchor_code);

create table jin_api_post
(
  id                  int(11) not null primary key,
  
  type                varchar(20) not null default '',

  title               varchar(255) not null default '',

  url                 varchar(255) not null default '',
  params              text not null default '',

  method              varchar(4) not null default '',
  
  key(type)
);

alter table jin_package add api_post_notifysale varchar(255) not null default '' after notifysale_settings;

alter table jin_role add priv_master_tools_apipost varchar(50) not null default '' after priv_master_tools_apiuser;

alter table jin_product add api_post_notifysale varchar(255) not null default '' after send_cust_login_data;

alter table jin_funnel_splitpage add notes text not null default '' after template_comp;
alter table jin_funnel_splitpage add is_default int(1) not null default 0  after notes;
alter table jin_funnel_splitpage add is_nowedit int(1) not null default 0  after is_default;

create table jin_funnel_splittest
(
  id                   int(11) not null primary key,
  
  sync_tstamp          datetime null,
  
  funnel_id            int(11) not null,
  step_id              int(11) not null,

  title                varchar(255) not null default '',
  descr                text not null default '',
  
  enabled              int(1) not null default 0,

  datetime_from        datetime null,
  datetime_to          datetime null,

  visit_delay          int(4) not null default 0,

  costrevenue          text not null default '',
  testusers            varchar(255) not null default '',
  testips              varchar(255) not null default '',
  
  key(funnel_id),
  key(step_id)
);
