ALTER TABLE jin_user 
ADD COLUMN access_by_dt tinyint(1) DEFAULT NULL AFTER paypal_adaptpay_link,
ADD COLUMN access_dt_from datetime DEFAULT NULL AFTER access_by_dt,
ADD COLUMN access_dt_till datetime DEFAULT NULL AFTER access_dt_from;

ALTER TABLE jin_role 
ADD COLUMN priv_auth_profile_login tinyint(1) NOT NULL DEFAULT '0' AFTER priv_supervisor;

INSERT INTO `jin_role` (`id`, `title`, `needapproval`, `enhanced_mode`, `priv_supervisor`, `priv_auth_profile_login`, `priv_auth_profile_merchant`, `priv_auth_profile_smtpservers`, `priv_auth_profile_apicenter`, `priv_auth_profile_security`, `priv_auth_profile_member`, `priv_auth_profile_pgates`, `priv_auth_profile_affpgates`, `priv_master_store_packages`, `priv_master_store_products`, `priv_master_store_funnels`, `priv_master_store_oneclickords`, `priv_master_store_minisites`, `priv_master_store_jvproducts`, `priv_master_store_specprices`, `priv_master_store_shopcarts`, `priv_master_store_otos`, `priv_master_store_downloads`, `priv_master_store_brandpdfs`, `priv_master_store_memberships`, `priv_master_store_quests`, `priv_master_store_extscripts`, `priv_master_store_taxes`, `priv_master_store_shippings`, `priv_master_customers_sales`, `priv_master_customers_jvmsubs`, `priv_master_customers_actsubs`, `priv_master_customers_memberships`, `priv_master_customers_quests`, `priv_master_customers_extscripts`, `priv_master_customers_shipdue`, `priv_master_customers_tracklinks`, `priv_master_affiliates_users`, `priv_master_affiliates_affprogs`, `priv_master_affiliates_campaigns`, `priv_master_affiliates_series`, `priv_master_affiliates_commissions`, `priv_master_affiliates_paycomms`, `priv_master_affiliates_royalties`, `priv_master_users_all`, `priv_master_users_massmail`, `priv_master_users_massuserop`, `priv_master_users_roles`, `priv_master_users_specusers`, `priv_master_users_customfields`, `priv_master_users_downlines`, `priv_master_users_import`, `priv_master_users_invite`, `priv_master_users_approve`, `priv_master_users_insignia`, `priv_master_tools_stats`, `priv_master_tools_templates`, `priv_master_tools_emails`, `priv_master_tools_customtags`, `priv_master_tools_forms`, `priv_master_tools_bans`, `priv_master_tools_coupons`, `priv_master_tools_rewards`, `priv_master_tools_shorturls`, `priv_master_tools_export`, `priv_master_tools_pieces`, `priv_master_tools_dbbackup`, `priv_master_tools_satelliteinstallations`, `priv_master_plugins_invoicepdfs`, `priv_master_plugins_promogen`, `priv_master_plugins_sponsorships`, `priv_master_plugins_supros`, `priv_master_plugins_banners`, `priv_master_plugins_linkdirs`, `priv_master_plugins_alerts`, `priv_master_plugins_testimonials`, `priv_master_plugins_followupman`, `priv_master_plugins_jvevents`, `priv_master_plugins_affinbs`, `priv_master_plugins_pages`, `priv_master_plugins_geoforce`, `priv_master_plugins_blogpub`, `priv_master_plugins_bcastnews`, `priv_master_plugins_certman`, `priv_master_plugins_clouds`, `priv_master_plugins_multrec`, `priv_master_plugins_reminders`, `priv_master_plugins_helptickets`, `priv_master_plugins_metaaffs`, `priv_master_plugins_contseries`, `priv_master_plugins_lessonman`, `priv_master_plugins_surveys`, `priv_master_plugins_trackurls`, `priv_master_plugins_ezinepoints`, `priv_member_account_purchases`, `priv_member_account_mems`, `priv_member_account_jvmsubs`, `priv_member_account_ccupdate`, `priv_member_account_points`, `priv_member_account_helptickets`, `priv_member_account_backlink`, `priv_member_account_surveys`, `priv_member_promote_dashboard`, `priv_member_promote_affprogs`, `priv_member_promote_links`, `priv_member_promote_campaigns`, `priv_member_promote_sales`, `priv_member_promote_commissions`, `priv_member_promote_jvproducts`, `priv_member_promote_royalties`, `priv_member_promote_payroyalties`, `priv_member_downline_view`, `priv_member_downline_massmail`, `priv_member_downline_commissions`, `priv_member_downline_refer`, `priv_spec_maildownlinenofooter`, `priv_spec_yourcommissionseecustomer`, `priv_spec_yourcommissionseezero`, `priv_spec_autoresowncust`, `priv_spec_autoresrefcust`, `limit_massmailnumber`, `limit_massmailperiod`, `limit_memberships`, `limit_labels`)
VALUES
	(4, 'Demo mode', 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 'add', 'add', 'add', 'add', 'add', '', 'add', 'add', 'add', 'add', 'add', 'add', 'add', 'add', '', '', 'add', '', '', 'add', 'add', 'add', '', '', '', 'add', '', '', '', '', '', 'add', '', '', 'add', 'add', '', 'add', '', '', '', '', '', '', '', 'add', '', '', 'add', '', 'add', '', '', '', '', 'add', '', '', 'add', '', 'add', '', 'add', '', 'add', '', 'add', 'add', '', 'add', '', '', '', 'add', 'add', 'add', 'add', 'add', '', 'add', 'add', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', 0, 0, 0, 0, 0, '', 'day', '', '');