alter table jin_sale add numprod int(11) not null default 0 after prod_title;


alter table jin_role add priv_master_plugins_bcastnews int(1) not null default 0 after priv_master_plugins_blogpub;

create table jin_bcastnews
(
  id                  int(11) not null primary key,
  owner_id            int(11) not null,
  
  display_on_ws       int(1) not null default 0,
  
  display_mode        int(3) not null default 0,
  display_mode_value  int(3) not null default 0,
  
  secret_word         varchar(50) not null default '',
  
  template            text not null default '',
  template_one_msg    text not null default '',
  
  key(owner_id)
);

create table jin_bcastnews_message
(
  id             int(11) not null primary key,
  owner_id       int(11) not null,
  
  pdate          datetime null,
  
  message_brief  text not null default '',
  message_full   text not null default '',
  
  author         varchar(50) not null default '',
  
  key(owner_id,pdate)
);

create table jin_bcastnews_feeder
(
  id             int(11) not null primary key,
  owner_id       int(11) not null,
  
  title          varchar(255) not null default '',
  
  url            varchar(255) not null default '',
  secret_word    varchar(50) not null default '',
  
  user_id        int(11) not null default 0,
  membership_id  int(11) not null default 0,
  
  key(owner_id)
);

alter table jin_product modify specprice varchar(255) not null default '';
update jin_product set specprice='' where specprice='0.00';

alter table jin_shopcart_category add parent_id int(11) not null after pack_id;
alter table jin_shopcart_category add path_id varchar(255) not null default '' after seq;
alter table jin_shopcart_category add path_seq varchar(255) not null default '' after path_id;
alter table jin_shopcart_category add key(owner_id,pack_id,parent_id);
alter table jin_shopcart_category add key(owner_id,pack_id,path_seq);
