ALTER TABLE `user`
ADD `stripe_account_id` varchar(200) NULL AFTER `status`,
ADD `stripe_customer_id` varchar(200) NULL AFTER `stripe_account_id`,
ADD `stripe_card_id` varchar(200) NULL AFTER `stripe_customer_id`,
ADD `stripe_account_verified` varchar(200) NULL AFTER `stripe_card_id`,
ADD `stripe_connect_by_customer` varchar(200) NULL AFTER `stripe_account_verified`,
ADD `stripe_webhook_request` text NULL AFTER `stripe_connect_by_customer`;



ALTER TABLE `user`
ADD `card` varchar(200) COLLATE 'utf8_general_ci' NULL AFTER `stripe_card_id`,
ADD `exp_month` varchar(200) COLLATE 'utf8_general_ci' NULL AFTER `card`,
ADD `exp_year` varchar(200) COLLATE 'utf8_general_ci' NULL AFTER `exp_month`;





-- Adminer 4.2.5 MySQL dump

SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

CREATE TABLE `membership_plans` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `members_unlock_next_level` varchar(255) NOT NULL,
  `days_unlock_next_level` varchar(255) NOT NULL,
  `level` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `price` decimal(11,2) NOT NULL,
  `days` int(11) NOT NULL,
  `currency` varchar(255) NOT NULL,
  `currency_code` varchar(255) NOT NULL,
  `image` text,
  `percentage` int(3) DEFAULT NULL,
  `status` tinyint(1) NOT NULL,
  `created` datetime NOT NULL,
  `created_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`),
  CONSTRAINT `membership_plans_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `admins` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `membership_plans` (`id`, `members_unlock_next_level`, `days_unlock_next_level`, `level`, `title`, `slug`, `price`, `days`, `currency`, `currency_code`, `image`, `percentage`, `status`, `created`, `created_by`, `deleted_at`, `modified`) VALUES
(21,	'150000',	'60',	'level_3',	'Gold',	'gold-Gpda2A',	15.00,	30,	'$',	'USD',	'/uploads/membership/16292648997473-gold.jpg',	NULL,	1,	'2021-08-07 15:25:20',	7,	NULL,	'2021-08-18 05:35:03'),
(22,	'200000',	'60',	'level_4',	'Platinum',	'platinum-Xp7jwa',	20.00,	30,	'$',	'USD',	'/uploads/membership/16292647021541-platinum.jpg',	NULL,	1,	'2021-08-07 15:25:57',	7,	NULL,	'2021-08-18 05:31:45'),
(23,	'250000',	'60',	'level_5',	'Diamond',	'diamond-098VpE',	25.00,	30,	'$',	'USD',	'/uploads/membership/16292649474300-diamond.jpg',	NULL,	1,	'2021-08-07 15:27:54',	7,	NULL,	'2021-08-18 05:35:49'),
(24,	'2',	'10',	'level_1',	'Bronze',	'bronze-x2zapA',	5.00,	30,	'$',	'USD',	'/uploads/membership/16292026429879-bronze.png',	NULL,	1,	'2021-08-07 15:28:40',	7,	NULL,	'2021-08-25 13:03:48'),
(25,	'100000',	'60',	'level_2',	'Silver',	'silver-WwoE2l',	10.00,	30,	'$',	'USD',	'/uploads/membership/16292034533489-silver-new.jpg',	NULL,	1,	'2021-08-07 15:29:13',	7,	NULL,	'2021-08-27 11:26:46'),
(26,	'300000',	'60',	'level_6',	'Red Diamond',	'red-diamond-b9a3p6',	30.00,	30,	'$',	'USD',	'/uploads/membership/16292043065621-red-diamond.jpg',	NULL,	1,	'2021-08-17 18:15:08',	7,	NULL,	'2021-08-17 12:45:08'),
(27,	'350000',	'60',	'level_7',	'Black Diamond',	'black-diamond-G9DZpj',	35.00,	30,	'$',	'USD',	'/uploads/membership/16292062145271-black-diamond.jpg',	NULL,	1,	'2021-08-17 18:46:58',	7,	NULL,	'2021-08-17 13:16:58'),
(28,	'5000000',	'60',	'level_8',	'Blue Diamond',	'blue-diamond-D2V62E',	40.00,	30,	'$',	'USD',	'/uploads/membership/16292241862682-screenshot-2021-08-06-194259.png',	NULL,	1,	'2021-08-17 23:46:36',	7,	NULL,	'2021-08-25 07:43:20');

-- 2021-09-09 06:15:06


;


ALTER TABLE `membership_plans`
DROP `members_unlock_next_level`,
DROP `days_unlock_next_level`,
DROP `level`,
DROP `percentage`,
DROP `created_by`,
DROP `deleted_at`,
CHANGE `modified` `modified` timestamp NOT NULL AFTER `created`;


ALTER TABLE `membership_plans`
DROP `members_unlock_next_level`,
DROP `days_unlock_next_level`,
DROP `level`,
DROP `percentage`,
CHANGE `modified` `modified` timestamp NOT NULL DEFAULT 'current_timestamp()' AFTER `deleted_at`;


ALTER TABLE `membership_plans`
DROP `members_unlock_next_level`,
DROP `days_unlock_next_level`,
DROP `level`,
DROP `percentage`,
CHANGE `modified` `modified` timestamp NOT NULL AFTER `deleted_at`;


ALTER TABLE `membership_plans`
DROP FOREIGN KEY `membership_plans_ibfk_1`




ALTER TABLE `membership_plans`
DROP `created_by`,
DROP `deleted_at`,
CHANGE `modified` `modified` timestamp NOT NULL AFTER `created`;





DELETE FROM `membership_plans`
WHERE ((`id` = '22') OR (`id` = '23') OR (`id` = '24') OR (`id` = '25') OR (`id` = '26') OR (`id` = '27') OR (`id` = '28'));


UPDATE `membership_plans` SET `slug` = 'gold' WHERE `id` = '21';


UPDATE `membership_plans` SET `id` = '1' WHERE `id` = '21';


INSERT INTO `membership_plans` (`title`, `slug`, `price`, `days`, `currency`, `currency_code`, `image`, `status`, `created`, `modified`)
SELECT 'Gold', 'gold', '15.00', '30', '$', 'USD', '/uploads/membership/16292648997473-gold.jpg', '1', '2021-08-07 15:25:20', '2021-09-09 11:49:31'
FROM `membership_plans`
WHERE ((`id` = '1'));


DELETE FROM `membership_plans`
WHERE ((`id` = '29'));


UPDATE `membership_plans` SET `image` = '' WHERE `id` = '1';


-- Adminer 4.2.5 MySQL dump

SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

CREATE TABLE `settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `settings` (`id`, `name`, `value`) VALUES
(1,	'company_name',	'Give it away for free'),
(2,	'website_url',	'https://globizcloudserver.com'),
(3,	'measurement_unit',	'pc'),
(4,	'currency_symbol',	'$'),
(5,	'company_address',	'Brightwood, Washington DC, US'),
(6,	'company_gst_number',	'1888998520'),
(7,	'currency_code',	'USD'),
(8,	'admin_recaptcha',	''),
(9,	'admin_second_auth_factor',	''),
(10,	'recaptcha_secret',	'6LdhM1oaAAAAACK2IkHNxnjEMh5Jkoa5hl2aZb0i'),
(11,	'recaptcha_key',	'6LdhM1oaAAAAADJXL3qLn2sxBpbMTdnaHZwV8hL1'),
(12,	'sendgrid_api_key',	'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'),
(13,	'sendgrid_email',	'vermani.ritish@gmail.com'),
(14,	'pagination_method',	'reload'),
(15,	'globiz_logo',	'data:image/png;base64,[encoded data, 24332 characters]'),
(16,	'favicon',	'/uploads/logos/16153640395882-16149493374456-logo-black-small-squre.png'),
(17,	'from_email',	'info@example.com'),
(18,	'smtp_host',	'smtp.gmail.com'),
(19,	'smtp_encryption',	'ssl'),
(20,	'smtp_username',	'globiznotifications@gmail.com'),
(21,	'smtp_email',	'globiznotifications@gmail.com'),
(22,	'smtp_password',	'eyJpdiI6ImQzdWtXRWFnUWFBL0RRbUZOZ3lzWHc9PSIsInZhbHVlIjoiWFFES0w5ZHdYd21OS2dDMVJOTTlXQT09IiwibWFjIjoiZWFmMGRmNmI4MGI3ODM5ZGQxNGQzMmIxMDZkOGM1NjE5OTY4ZDdmNDYyN2VlNzRkZmI3N2MxMmJkZDhmMTE1YiJ9'),
(23,	'smtp_port',	'465'),
(24,	'email_method',	'smtp'),
(25,	'logo',	'/uploads/logos/16261534815659-logo2.png'),
(26,	'admin_notification_email',	'info@example.com'),
(27,	'date_format',	'd.m.Y'),
(28,	'time_format',	'H:i'),
(29,	'direct_login_after_registration',	'0'),
(30,	'session_expires_in_minutes',	'1440'),
(31,	'client_recaptcha',	'0'),
(32,	'client_second_auth_factor',	''),
(33,	'client_multi_device_logins',	'1'),
(35,	'home_page_text',	'Over 12,140 products looking for new homes'),
(36,	'home_page_banner',	''),
(37,	'home_page_search_text',	'Find local products'),
(39,	'home_page_layout',	'center'),
(40,	'home_page_search_sugession',	'1'),
(41,	'position_stack_api_key',	'738a66997b77d5db756c2c20c139bf34'),
(42,	'position_stack_target_country',	'GB'),
(43,	'facebook_app_id',	'903832267081983'),
(44,	'facebook_app_secret',	'0a0e52c24f34e58a37ac205557939f01'),
(45,	'facebook_api_version',	'v2.10'),
(46,	'stripe_key',	'sk_test_51JPnXjDCrytSI8omWVXLAQpm9p48GFBY3umiba0PzVxuzkpMdKRZnw3MLLG9nTsPzwUvOGzfwrUXiXD8NDBdErUA003jwmxK3Y'),
(47,	'stripe_public_key',	'pk_test_51JPnXjDCrytSI8omTJQh46IIlzqAFH4FwelN0Xl7RbMYX4lC9qY5g0Pd8OdN7hmSStocEYVOswHxgHnKOvJR4QVH00QIUokOe9'),
(48,	'membership_number_prefix',	'11000'),
(49,	'start_program_day',	'2021-09-07'),
(50,	'deduct_amount_percentage',	'70');

-- 2021-09-09 06:20:13


;


DELETE FROM `settings`
WHERE ((`id` = '48') OR (`id` = '49') OR (`id` = '50'));


UPDATE `settings` SET `value` = 'Ai Dating' WHERE `id` = '1';


UPDATE `settings` SET `value` = 'sk_test_51JXOG6SF5HIwr4xAtJvxBVGdV66Fs5oNLNmYeBX4SdkfTrmQEoWNTuvDDM7kFkWoMT8Re7xmNfKi7Pewg6ASAZvJ00KD5sJ8x0' WHERE `id` = '46';
UPDATE `settings` SET `value` = 'pk_test_51JXOG6SF5HIwr4xAGChh2ScBxTf9TXedT4SvDHp696PpIOppzTAFHCvhfAuiyuI2LNPUudskyrxqtiTiqkOC1TjW00JgbVzNqw' WHERE `id` = '47';


INSERT INTO `settings` (`id`, `name`, `value`) VALUES
(48,	'razorpaykeyid',	'rzp_test_y0TnPH4EgIMYn8'),
(49,	'razorpaykeysecret',	'7Vo0eLhFmD9COKMhXoeglV0q');


UPDATE `membership_plans` SET `currency_code` = 'INR' WHERE `id` = '1';


UPDATE `membership_plans` SET `currency` = '₹' WHERE `id` = '1';

-- Adminer 4.2.5 MySQL dump

SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';


CREATE TABLE `transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `property` varchar(255) DEFAULT NULL,
  `property_id` int(11) DEFAULT NULL,
  `type` char(20) DEFAULT NULL,
  `cc_user_id` int(11) NOT NULL,
  `price` varchar(255) NOT NULL,
  `razorpay_payment_id` varchar(255) NOT NULL,
  `razorpay_order_id` varchar(255) NOT NULL,
  `razorpay_signature` varchar(255) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `shop_plan` (`property_id`),
  KEY `cc_user_id` (`cc_user_id`),
  CONSTRAINT `transactions_ibfk_2` FOREIGN KEY (`cc_user_id`) REFERENCES `cc_users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_3` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `transactions` (`id`, `property`, `property_id`, `type`, `cc_user_id`, `price`, `razorpay_payment_id`, `razorpay_order_id`, `razorpay_signature`, `created`) VALUES
(22,	NULL,	NULL,	'to_see_buyer_details',	346,	'100',	'pay_HqWpcgq8ldrW2o',	'order_HqWpVRtiRNvDDt',	'2749c9afa43c36714beed4c49e5fa25db6cc1b07370be62efbda9e9096c39843',	'2021-08-28 12:33:07'),
(23,	'PARAMOUNT MIAMI WORLDCENT',	733,	'for_buy_property',	97,	'100',	'pay_Hrhs9ZqZW8oHOR',	'order_HrhrzzwbdltPqq',	'cc948df1f0b63d65a757da81241c1e5b9dbfa6ebb0a3471f39dfc54334bb503b',	'2021-08-31 12:00:06'),
(24,	NULL,	NULL,	'for_expose_details',	47,	'100',	'pay_Hri8pqHjhFI7on',	'order_Hri8k7K0RFbgHu',	'6da5a1996d4d748aa8be13e477097057b34601cbfc1afa4954d871f472fee921',	'2021-08-31 12:15:53'),
(25,	'PARAMOUNT MIAMI WORLDCENT',	733,	'for_buy_property',	293,	'100',	'pay_Hrj1g6hewkVIrk',	'order_Hrj1ZtlArWRvjF',	'7120b3055c3be3ec0d7119283ab8e2c71f452b17ff7d9ad0716211df8cfde9a6',	'2021-08-31 13:07:48');

-- 2021-09-09 10:29:39


;


DELETE FROM `transactions`
WHERE ((`id` = '22') OR (`id` = '23') OR (`id` = '24') OR (`id` = '25'));


ALTER TABLE `transactions`
CHANGE `property` `plan` varchar(255) COLLATE 'utf8mb4_general_ci' NULL AFTER `id`,
CHANGE `property_id` `plan_id` int(11) NULL AFTER `plan`,
DROP `type`,
ADD FOREIGN KEY (`plan_id`) REFERENCES `membership_plans` (`id`) ON DELETE CASCADE,
ADD FOREIGN KEY (`cc_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;


ALTER TABLE `transactions`
CHANGE `property` `plan` varchar(255) COLLATE 'utf8mb4_general_ci' NULL AFTER `id`,
CHANGE `property_id` `plan_id` int(11) NULL AFTER `plan`,
DROP `type`,
ADD FOREIGN KEY (`plan_id`) REFERENCES `membership_plans` (`id`) ON DELETE CASCADE,
ADD FOREIGN KEY (`cc_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;


ALTER TABLE `transactions`
DROP FOREIGN KEY `transactions_ibfk_3`


ALTER TABLE `transactions`
CHANGE `property` `plan` varchar(255) COLLATE 'utf8mb4_general_ci' NULL AFTER `id`,
CHANGE `property_id` `plan_id` int(11) NULL AFTER `plan`;


ALTER TABLE `transactions`
ADD FOREIGN KEY (`plan_id`) REFERENCES `membership_plans` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT


ALTER TABLE `transactions`
DROP `type`;


ALTER TABLE `user`
ADD `plan_id` int(11) NULL AFTER `stripe_webhook_request`,
ADD `plan_name` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `plan_id`,
ADD `expired_on` datetime NULL AFTER `plan_name`,
ADD FOREIGN KEY (`plan_id`) REFERENCES `membership_plans` (`id`) ON DELETE CASCADE;


ALTER TABLE `user`
ADD `plan_days` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `plan_name`;


ALTER TABLE `transactions`
DROP FOREIGN KEY `transactions_ibfk_2`,
ADD FOREIGN KEY (`cc_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT


DELETE FROM `transactions`
WHERE ((`id` = '29') OR (`id` = '30') OR (`id` = '31'));