ALTER TABLE tbl_payments_api RENAME TO tbl_addons_api;
ALTER TABLE tbl_email_templates ADD sms_body varchar(255);
ALTER TABLE tbl_email_templates MODIFY id INT AUTO_INCREMENT;

--
-- Table structure for table `tbl_paypal`
--

CREATE TABLE `tbl_paypal` (
  `id` int(11) NOT NULL,
  `userid` int(11) NOT NULL,
  `invoice` varchar(255) NOT NULL,
  `plan` int(11) NOT NULL,
  `txn_id` varchar(255) NOT NULL,
  `local_currency` float(10,2) NOT NULL,
  `payment_gross` float(10,2) NOT NULL,
  `currency_code` varchar(5) NOT NULL,
  `payer_email` varchar(255) NOT NULL,
  `payment_status` varchar(255) NOT NULL,
  `createdDtm` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

ALTER TABLE `tbl_paypal`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `tbl_paypal`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

-- --------------------------------------------------------
--
-- Dumping data for table `tbl_addons_api`
--

INSERT INTO `tbl_addons_api` (`id`, `name`, `logo`, `public_key`, `secret_key`, `IPN_secret`, `merchantID`, `base_url`, `env`, `currency`, `status`, `createdDtm`) VALUES
(2, 'PayPal', 'paypal.png', '', '', '', '', '', '', 'USD', 0, '2019-11-22 00:00:00'),
(3, 'Twilio', 'twilio.png', '', '', '', '', '', '', 'USD', 0, '2019-11-22 00:00:00');

-- --------------------------------------------------------

--
-- Dumping data for table `tbl_email_templates`
--

INSERT INTO `tbl_email_templates` (`id`, `type`, `title`, `mail_subject`, `mail_body`, `sms_body`, `modifiedBy`, `modifiedDtm`, `createdDtm`) VALUES
(DEFAULT, 'Test Email', '', '!companyName Test Email', 0x[encoded data, 7602 characters], 'This is a test SMS', 1, '2020-02-01 13:12:59', '0000-00-00 00:00:00');

--
-- Dumping sms_body for table `tbl_email_templates`
--

UPDATE tbl_email_templates SET sms_body='Please go to !resetLink to reset your password. If you did not request a new password please ignore' WHERE id=2;
UPDATE tbl_email_templates SET sms_body='!referrerName has invited you to join !companyName. Click on !referralLink to register' WHERE id=3;
UPDATE tbl_email_templates SET sms_body='You have succesfully deposited !depositAmount into your account.' WHERE id=4;
UPDATE tbl_email_templates SET sms_body='Your request for withdrawing !withdrawalAmount has been processed successfully. Please check your withdrawal account to confirm payment.' WHERE id=5;
UPDATE tbl_email_templates SET sms_body='Your request for withdrawing !withdrawalAmount has been received successfully. Kindly note that our payment periods are on Mondays, Wednesdays and Fridays.' WHERE id=6;
UPDATE tbl_email_templates SET sms_body='Your new account at !companyName has been created. Please click on the following link to set your password. !passwordResetLink' WHERE id=7;
UPDATE tbl_email_templates SET sms_body='Your payment account has been updated. If this was not you, kindly contact support as soon as possible.' WHERE id=8;
UPDATE tbl_email_templates SET sms_body='Welcome to !companyName. Here are your login details.     Email: !clientEmail  Password: xxxxxxxxx' WHERE id=9;
UPDATE tbl_email_templates SET sms_body='Your payment for $!depositAmount could not be processed. Please try again.    If you have already sent the funds, kindly get in touch with our support team.' WHERE id=10;
UPDATE tbl_email_templates SET sms_body='You have earned !amount from !companyName with reference number !ref. Please check your account.' WHERE id=11;

--
-- Dumping data for table `tbl_settings`
--

INSERT INTO `tbl_payment_methods` (`id`, `name`, `logo`, `ref`, `API`, `bank_name`, `account_name`, 
`account_number`, `swift_code`, `status`) VALUES
(DEFAULT, 'Paypal', 'paypal.png', 'PP', 2, '', '', '', '', 0),
(DEFAULT, 'Litecoin Testnet', 'ltct.png', 'LTCT', 4, '', '', '', '', 0);

INSERT INTO `tbl_settings` (`type`, `value`, `updatedDtm`) VALUES
('email_active', '0', '0000-00-00 00:00:00'),
('sms_active', '0', '0000-00-00 00:00:00'),
('sms_phone', '', '0000-00-00 00:00:00'),
('SMTPCrypto', '', '0000-00-00 00:00:00'),
('SMTPProtocol', '', '0000-00-00 00:00:00');
