alter table jin_role add priv_master_tools_exportpieces int(1) not null default 0 after priv_master_tools_export;
alter table jin_role add priv_master_tools_importpieces int(1) not null default 0 after priv_master_tools_exportpieces;

alter table jin_affprog add email_welcome text not null default '' after welcomem_ids;
alter table jin_package add email_welcome text not null default '' after welcomem_ids;
alter table jin_user_settings add email_ma2cust    text not null default '' after welcomem_ma2cust_ids;
alter table jin_user_settings add email_me2refered text not null default '' after welcomem_me2refered_ids;

alter table jin_rmem   add email_access text not null default '' after use_altauth;
alter table jin_lmem   add email_access text not null default '' after use_altauth;
alter table jin_cmsmem add email_access text not null default '' after path;

alter table jin_rmem   add email_delete text not null default '' after email_access;
alter table jin_lmem   add email_delete text not null default '' after email_access;
alter table jin_cmsmem add email_delete text not null default '' after email_access;

alter table jin_coupon add email_cust text not null default '' after usage_aff;
alter table jin_coupon add email_aff  text not null default '' after email_cust;

alter table jin_user_settings drop pg_2c_sid;
alter table jin_user_settings drop pg_2c_secret;
alter table jin_user_settings drop pg_cb_nickname;
alter table jin_user_settings drop pg_mb_email;
alter table jin_user_settings drop pg_an_x_login;
alter table jin_user_settings drop pg_an_txn_key;
alter table jin_user_settings drop pg_lp_storename;
alter table jin_user_settings drop pg_lp_certfile;

alter table jin_role add priv_spec_autoresowncust int(1) not null default 0 after priv_spec_yourcommissionseecustomer;
alter table jin_role add priv_spec_autoresrefcust int(1) not null default 0 after priv_spec_autoresowncust;
update jin_role set priv_spec_autoresowncust=1;
update jin_role set priv_spec_autoresrefcust=1;

alter table jin_user_settings add currency char(3) not null after no_upline_mail;
