alter table jin_embedded_email drop user_register;
alter table jin_embedded_email drop user_register_confirm;
alter table jin_embedded_email drop user_remindpasswd;
alter table jin_embedded_email drop user_changeemail;
alter table jin_embedded_email drop user_import;
alter table jin_embedded_email drop user_logindata;
alter table jin_embedded_email drop approvals_affprog_due;
alter table jin_embedded_email drop approvals_affprog_approved;
alter table jin_embedded_email drop approvals_affprog_rejected;
alter table jin_embedded_email drop approvals_role_due;
alter table jin_embedded_email drop approvals_role_approved;
alter table jin_embedded_email drop approvals_role_rejected;
alter table jin_embedded_email drop sale_paidcustomer;
alter table jin_embedded_email drop sale_paidadmin;
alter table jin_embedded_email drop sale_paidowner;
alter table jin_embedded_email drop sale_echeckfailed;
alter table jin_embedded_email drop access_minisite;
alter table jin_embedded_email drop comm_created;
alter table jin_embedded_email drop comm_createdrecur;
alter table jin_embedded_email drop comm_referral;
alter table jin_embedded_email drop comm_refunded;			
alter table jin_embedded_email drop jventure_product_added;
alter table jin_embedded_email drop jventure_product_modified;
alter table jin_embedded_email drop jventure_product_reqmod;
alter table jin_embedded_email drop jventure_product_approved;

drop table jin_cron;

update jin_sale set tstamp_date=date(tstamp);

alter table jin_commission add paid_tstamp datetime null after paid;
update jin_commission set paid_tstamp=now() where paid=1;


create table jin_text_revision
(
  id          int(11) not null primary key auto_increment,
  
  obj_type    varchar(15) not null default '',
  obj_id      int(11) not null default 0,
  
  tstamp      datetime null,
  user_id     int(11) not null default 0,
  comment     varchar(255) not null default '',
 
  data        longtext not null default '',

  key(obj_type,obj_id)
);
