
# fix
update jin_product set dlv_otos='' where dlv_otos='0';

create table jin_testimonial_page
(
  id           int(11) not null primary key,
  owner_id     int(11) not null,
  
  tag          varchar(255) not null default '',
  
  add_code     varchar(255) not null default '',
  ipp          int(11) not null default 0,
  template     longtext not null default '',
  
  key(owner_id,tag)
);

create table jin_testimonial
(
  id            int(11) not null primary key,
  owner_id      int(11) not null,
  
  approved      int(1) not null default 0,
  ctime         datetime null,
  tag           varchar(255) not null default '',
  
  name          varchar(255) not null default '',
  email         varchar(255) not null default '',
  image         varchar(30) not null default '',
  website_title varchar(255) not null default '',
  website_url   varchar(255) not null default '',
  testimonial   text not null default '',
  
  videofile     varchar(30) not null default '',
  player        varchar(30) not null default '',
  youtube_id    varchar(30) not null default '',
  
  url           varchar(255) not null default '',
  
  key(owner_id,tag,approved)
);

alter table jin_role add priv_master_tools_testimonials int(1) not null default 0 after priv_master_tools_extscripts;

alter table jin_sale add aweber_done int(1) not null default 0 after oto_shown;
update jin_sale set aweber_done=1;

# use-sell point

create table jin_priceinc
(
  id            int(11) not null primary key,
  owner_id      int(11) not null,

  date_start    date null,
  date_end      date null,
  time_start    time null,
  time_end      time null,
  
  price_start   decimal(8,2) not null default '0',
  price_end     decimal(8,2) not null default '0',
  
  incr          varchar(32) not null default '',
  period_l      int(4) not null default 0,
  period_u      varchar(15) not null default '',

  jsflow        int(1) not null default 0,
  
  template      text not null default ''  
);
