
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('40', '1', '4', 'disclaimer', 'Disclaimer', '1', '1', '0', '1', '1');


CREATE TABLE `coupons` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(100) NULL,
  `code` VARCHAR(25) NULL,
  `type` VARCHAR(12) NULL,
  `value` DOUBLE NULL,
  `maxUsage` INT NULL,
  `userUsage` INT NULL,
  `validFrom` DATETIME NULL,
  `validTo` DATETIME NULL,
  `maxDiscountAmount` DOUBLE NULL,
  `description` LONGTEXT NULL,
  `termsCondition` LONGTEXT NULL,
  `isActive` TINYINT NULL DEFAULT '1',
  `isDelete` TINYINT NULL DEFAULT '0',
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL DEFAULT NULL,
  `modifiedBy` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`));



CREATE TABLE `packagecoupons` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `packageId` INT NULL,
  `couponId` INT NULL,
  `isActive` TINYINT NULL DEFAULT '1',
  `isDelete` TINYINT NULL DEFAULT '0',
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL DEFAULT NULL,
  `modifiedBy` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_packagecoupon_package_idx` (`packageId` ASC) ,
  INDEX `fk_packagecoupon_coupon_idx` (`couponId` ASC) ,
  CONSTRAINT `fk_packagecoupon_package`
    FOREIGN KEY (`packageId`)
    REFERENCES `package` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_packagecoupon_coupon`
    FOREIGN KEY (`couponId`)
    REFERENCES `coupons` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);


ALTER TABLE `userpackage` 
ADD COLUMN `couponId` INT NULL AFTER `paymentId`,
ADD INDEX `fk_userpackage_coupon_idx` (`couponId` ASC) ;

ALTER TABLE `userpackage` 
ADD CONSTRAINT `fk_userpackage_coupon`
  FOREIGN KEY (`couponId`)
  REFERENCES `coupons` (`id`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;



INSERT INTO `flaggroup` (`id`, `flagGroupName`, `detail`, `parentFlagGroupId`, `displayOrder`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('12', 'Flutter Wave', 'Flutter Wave', '3', '5', '1', '0', '1', '1');
UPDATE `flaggroup` SET `parentFlagGroupId` = '3', `displayOrder` = '6' WHERE (`id` = '11');



UPDATE `systemflags` SET `valueList` = 'Razorpay;Stripe;PhonePe;Flutter Wave;Manual Payment' WHERE (`id` = '12');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('36', '12', '8', 'flutterWaveMerchantId', 'Flutter Wave Merchant Id', '200436957', '200436957', '1', '1', '0', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('37', '12', '8', 'flutterWavePublicKey', 'Flutter Wave Public Key', 'FLWPUBK_TEST-ac329afbd3373fd6a026ff0defd8af22-X', 'FLWPUBK_TEST-ac329afbd3373fd6a026ff0defd8af22-X', '1', '1', '0', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('38', '12', '8', 'flutterWaveSecretKey', 'Flutter Wave Secret Key', 'FLWSECK_TEST-35df0c1075351a8c78184c87b2696d38-X', 'FLWSECK_TEST-35df0c1075351a8c78184c87b2696d38-X', '1', '1', '0', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('39', '12', '8', 'flutterWaveEncryptionKey', 'Flutter Wave Encryption Key', 'FLWSECK_TEST29d7a62fb9e2', 'FLWSECK_TEST29d7a62fb9e2', '1', '1', '0', '1', '1');



CREATE TABLE `pages` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `path` VARCHAR(45) NULL,
  `title` VARCHAR(45) NULL,
  `type` VARCHAR(45) NULL,
  `active` TINYINT NULL,
  `group` VARCHAR(45) NULL,
  `parentId` INT NULL,
  `isActive` TINYINT NULL DEFAULT 1,
  `isDelete` TINYINT NULL DEFAULT 0,
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL,
  `modifiedBy` INT NULL,
  PRIMARY KEY (`id`));



INSERT INTO `pages` (`path`, `title`, `type`, `active`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin', 'Dashboard', 'link', '1', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('', 'Users', 'sub', '1', 'Users', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/appuser', 'App Users', 'link', '1', 'Users', '2', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/blockuser', 'Block Users', 'link', '1', 'Users', '2', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/users', 'Admin Users', 'link', '1', 'Users', '2', '1', '0', '1', '1');
INSERT INTO `pages` (`title`, `type`, `active`, `group`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('Packages', 'sub', '1', 'Packages', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/premiumaccount', 'Premium Account', 'link', '1', 'Packages', '6', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/premiumfacility', 'Premium Facility', 'link', '1', 'Packages', '6', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/timeduration', 'Time Duration', 'link', '1', 'Packages', '6', '1', '0', '1', '1');
INSERT INTO `pages` (`title`, `type`, `active`, `group`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('Master Entry', 'sub', '1', 'Master Entry', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/document-type', 'Document Type', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/religion', 'Religion', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/community', 'Community', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/subcommunity', 'Sub Community', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/maritalstatus', 'Marital Status', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/employment', 'Employment', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/occupation', 'Occupation', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/education', 'Education', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/diet', 'Diet', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/height', 'Height', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('/admin/income', 'Annual income', 'link', '1', 'Master Entry', '10', '1', '0', '1', '1');



INSERT INTO `roles` (`id`, `name`, `isActive`, `isDelete`) VALUES ('3', 'Employee', '1', '0');



ALTER TABLE `countries` 
ADD COLUMN `isDefult` TINYINT NULL DEFAULT 0 AFTER `dialCode`;




UPDATE `countries` SET `isDefult` = '1' WHERE (`id` = '1');



CREATE TABLE `profilefor` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(100) NULL,
  `isActive` TINYINT NULL DEFAULT '1',
  `isDelete` TINYINT NULL DEFAULT '0',
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL DEFAULT NULL,
  `modifiedBy` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`));



ALTER TABLE `profilefor` 
ADD COLUMN `gender` VARCHAR(45) NULL AFTER `name`;


ALTER TABLE `userpersonaldetail` 
ADD COLUMN `weight` DECIMAL(6,3) NULL AFTER `employmentTypeId`,
ADD COLUMN `profileForId` INT NULL AFTER `weight`,
ADD INDEX `fk_userpersonaldetail_profilefor_idx` (`profileForId` ASC) ;

ALTER TABLE `userpersonaldetail` 
ADD CONSTRAINT `fk_userpersonaldetail_profilefor`
  FOREIGN KEY (`profileForId`)
  REFERENCES `profilefor` (`id`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;



ALTER TABLE `users` 
ADD COLUMN `referalUserId` INT NULL AFTER `id`,
ADD INDEX `fk_users_users_idx` (`referalUserId` ASC) ;

ALTER TABLE `users` 
ADD CONSTRAINT `fk_users_users`
  FOREIGN KEY (`referalUserId`)
  REFERENCES `users` (`id`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;




INSERT INTO `flaggroup` (`id`, `flagGroupName`, `detail`, `displayOrder`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('13', 'Manage Wallet', 'Manage Wallet', '7', '1', '0', '1', '1');



INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('41', '13', '7', 'isEnableWallet', 'Enable Wallet', '0', '0', '1', '1', '0', '1', '1');



INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('42', '13', '7', 'isEnableReward', 'Enable Reward & Earn', '0', '0', '1', '1', '0', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('43', '13', '2', 'rewardAmount', 'Reward Amount', '0', '0', '1', '1', '0', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdBy`, `modifiedBy`) VALUES ('44', '13', '4', 'rewardTermsCondition', 'Reward Terms & Condition', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat</p>', '1', '1', '0', '1', '1');



CREATE TABLE `userwallets` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `userId` INT NULL,
  `amount` DECIMAL(10,2) NULL,
  `isActive` TINYINT NULL DEFAULT 1,
  `isDelete` TINYINT NULL DEFAULT 0,
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL,
  `modifiedBy` INT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_userwallet_user_idx` (`userId` ASC) ,
  CONSTRAINT `fk_userwallet_user`
    FOREIGN KEY (`userId`)
    REFERENCES `users` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);




CREATE TABLE `userwallethistory` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `userWalletId` INT NULL,
  `amount` DECIMAL(10,2) NULL,
  `isCredit` TINYINT NULL,
  `transactionDate` DATETIME NULL,
  `remark` LONGTEXT NULL,
  `isActive` TINYINT NULL DEFAULT '1',
  `isDelete` TINYINT NULL DEFAULT '0',
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL DEFAULT NULL,
  `modifiedBy` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_userwallethistory_userwallet_idx` (`userWalletId` ASC) ,
  CONSTRAINT `fk_userwallethistory_userwallet`
    FOREIGN KEY (`userWalletId`)
    REFERENCES `userwallets` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);



CREATE TABLE `currencies` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  `symbol` varchar(5) DEFAULT NULL,
  `code` varchar(10) DEFAULT NULL,
  `isDefault` tinyint DEFAULT '0',
  `isActive` tinyint DEFAULT '1',
  `isDelete` tinyint DEFAULT '0',
  `createdDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int DEFAULT NULL,
  `modifiedBy` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ;


CREATE TABLE `paymentgateway` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `jsonData` json DEFAULT NULL,
  `useInWallet` tinyint DEFAULT '0',
  `useInCheckout` tinyint DEFAULT '0',
  `useInAndroid` tinyint DEFAULT NULL,
  `useInApple` tinyint DEFAULT NULL,
  `isActive` tinyint DEFAULT '1',
  `isDelete` tinyint DEFAULT '0',
  `createdDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int DEFAULT NULL,
  `modifiedBy` int DEFAULT NULL,
  `description` longtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ;
  


INSERT INTO `currencies` VALUES (1,'Rupees','₹','INR',1,1,0,'2024-01-20 15:54:49','2024-01-20 15:54:49',1,1),(2,'US Dollar','$','USD',0,1,0,'2024-01-20 15:54:49','2024-01-20 15:54:49',1,1),(3,'Nigerian Naira','₦','NGN',0,1,0,'2024-01-20 16:32:00','2024-01-20 16:32:00',1,1),(4,'South African Rand','R','ZAR',0,1,0,'2024-01-20 16:32:00','2024-01-20 16:32:00',1,1);

INSERT INTO `paymentgateway` VALUES (1,'Razorpay','{\"apiKey\": \"YOUR-API-KEY\", \"secretKey\": \"YOUR-SECRET-KEY\"}',1,1,1,NULL,1,0,'2024-01-20 17:48:02','2024-01-20 17:48:02',1,1,NULL),(2,'Stripe','{\"secretKey\": \"YOUR-SECRET-KEY\", \"publishableKey\": \"YOUR-PUBLISHABLE-KEY\"}',1,1,1,NULL,1,0,'2024-01-20 17:48:02','2024-01-20 17:48:02',1,1,NULL),(3,'PhonePe','{\"saltKey\": \"YOUR-SALT-KEY\", \"saltIndex\": \"1\", \"merchantId\": \"YOUR-MERCHANT-ID\", \"apiEndPoint\": \"/pg/v1/pay\", \"redirectMode\": \"REDIRECT\", \"environmentValue\": \"SANDBOX\"}',1,1,1,NULL,1,0,'2024-01-20 17:48:02','2024-01-20 17:48:02',1,1,NULL),(4,'flutterWave','{\"publicKey\": \"YOUR-PUBLIC-KEY\", \"secretKey\": \"YOUR-SECRET-KEY\", \"merchantId\": \"YOUR-MERCHANT-ID\", \"encryptionKey\": \"YOUR-ENCRYPTION-KEY\"}',1,1,1,NULL,0,0,'2024-01-20 17:48:02','2024-01-20 17:48:02',1,1,NULL),(5,'AppleInAppPurchase',NULL,0,1,NULL,1,1,0,'2024-01-27 18:04:50','2024-01-27 18:04:50',NULL,NULL,NULL),(6,'GoogleInAppPurchase',NULL,0,1,1,NULL,1,0,'2024-01-27 18:04:50','2024-01-27 18:04:50',NULL,NULL,NULL),(7,'Wallet',NULL,NULL,1,1,1,1,0,'2024-01-27 18:04:50','2024-01-27 18:04:50',NULL,NULL,NULL),(8,'ManualPayment',NULL,NULL,1,1,1,1,0,'2024-01-31 14:26:16','2024-01-31 14:26:16',NULL,NULL,'<p>Step 1 - Transfer payments</p><p>Step 2 - Send the amount using the following</p><ul><li>Bank Details</li><li class=\"ql-indent-1\">[Your Bank Account Number] e.g.: 8515XX9587</li><li class=\"ql-indent-1\">[IFSC CODE] e.g.: BARBOXXXX</li></ul><p><br></p><p>&nbsp;&nbsp;&nbsp;&nbsp;OR</p><p><br></p><ul><li>[Your UPI ID] e.g: example@bank</li></ul><p><br></p><p>&nbsp;&nbsp;&nbsp;&nbsp;OR</p><p><br></p><ul><li><img src=\"data:image/png;base64,[encoded data, 8336 characters]\"></li></ul><p><br></p><p>Please send payment screen shot to Email([Your Email Address]) OR WhatsApp([Your WhatsApp No])</p><p><br></p><p>Step 3 - Once you are done with the above steps click on the Request button</p><p>Step 4 - Your account will be activated within 24 hours</p><p><br></p><p>[The above content is dummy. Look for the change in Admin Panel]</p>'),(9,'Paypal','{\"clientid\": \"YOUR-CLIENT-ID\", \"secretkey\": \"YOUR-SECRET-KEY\"}',1,1,1,NULL,0,0,'2024-02-02 10:16:16','2024-02-02 10:16:16',NULL,NULL,NULL),(10,'Paystack','{\"publickey\": \"YOUR-API-KEY\", \"secretkey\": \"YOUR-SECRET-KEY\"}',1,1,1,NULL,0,0,'2024-02-02 10:16:16','2024-02-02 10:16:16',NULL,NULL,NULL);


CREATE TABLE `currencypaymentgateway` (
  `id` int NOT NULL AUTO_INCREMENT,
  `currencyId` int DEFAULT NULL,
  `paymentGatewayId` int DEFAULT NULL,
  `isActive` tinyint DEFAULT '1',
  `isDelete` tinyint DEFAULT '0',
  `createdDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int DEFAULT NULL,
  `modifiedBy` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_support_currency_idx` (`currencyId`),
  KEY `fk_support_paymentgateway_idx` (`paymentGatewayId`),
  CONSTRAINT `fk_support_currency` FOREIGN KEY (`currencyId`) REFERENCES `currencies` (`id`),
  CONSTRAINT `fk_support_paymentgateway` FOREIGN KEY (`paymentGatewayId`) REFERENCES `paymentgateway` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ;



INSERT INTO `currencypaymentgateway` VALUES (1,1,1,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(2,2,1,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(3,3,1,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(4,4,1,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(5,1,2,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(6,2,2,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(7,3,2,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(8,4,2,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(9,1,3,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(10,3,4,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(11,4,4,1,0,'2024-01-20 18:01:04','2024-01-20 18:01:04',1,1),(24,1,5,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(25,2,5,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(26,3,5,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(27,4,5,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(28,1,6,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(29,2,6,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(30,3,6,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(31,4,6,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(32,1,7,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(33,2,7,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(34,3,7,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(35,4,7,1,0,'2024-01-29 10:01:30','2024-01-29 10:01:30',NULL,NULL),(37,2,9,1,0,'2024-02-02 10:26:21','2024-02-02 10:26:21',NULL,NULL),(38,3,10,1,0,'2024-02-02 10:26:21','2024-02-02 10:26:21',NULL,NULL),(39,2,10,1,0,'2024-02-02 10:26:21','2024-02-02 10:26:21',NULL,NULL),(40,1,8,1,0,'2024-02-02 10:26:21','2024-02-02 10:26:21',NULL,NULL),(41,2,8,1,0,'2024-02-02 10:26:21','2024-02-02 10:26:21',NULL,NULL),(42,3,8,1,0,'2024-02-02 10:26:21','2024-02-02 10:26:21',NULL,NULL),(43,4,8,1,0,'2024-02-02 10:26:21','2024-02-02 10:26:21',NULL,NULL);


ALTER TABLE `userpersonaldetail` 
CHANGE COLUMN `weight` `weight` FLOAT NULL DEFAULT NULL ;

CREATE TABLE `weight` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` INT NOT NULL,
  `isActive` TINYINT NULL DEFAULT '1',
  `isDelete` TINYINT NULL DEFAULT '0',
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL DEFAULT NULL,
  `modifiedBy` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`));

ALTER TABLE `weight` 
CHANGE COLUMN `name` `name` FLOAT NOT NULL ;


INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`) VALUES ('/admin/currency', 'Currency', 'link', '1', 'Master Entry', '10', '1', '0');
INSERT INTO `pages` (`path`, `title`, `type`, `active`, `group`, `parentId`, `isActive`, `isDelete`) VALUES ('/admin/paymentGateway', 'Payment Gateway', 'link', '1', 'Master Entry', '10', '1', '0');


UPDATE `flaggroup` SET `isDelete` = '1' WHERE (`id` = '4');
UPDATE `flaggroup` SET `isDelete` = '1' WHERE (`id` = '5');
UPDATE `flaggroup` SET `isDelete` = '1' WHERE (`id` = '9');
UPDATE `flaggroup` SET `isDelete` = '1' WHERE (`id` = '11');
UPDATE `flaggroup` SET `isDelete` = '1' WHERE (`id` = '12');




UPDATE `flaggroup` SET `isDelete` = '1' WHERE (`id` = '3');





INSERT INTO `weight` VALUES (1,58,1,0,'2024-01-31 10:33:18','2024-01-31 10:33:18',77,77),(2,62,1,0,'2024-01-31 10:38:58','2024-01-31 10:38:58',77,77),(3,67,1,0,'2024-02-01 12:10:34','2024-02-01 12:10:34',77,77),(4,30,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(5,31,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(6,32,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(7,33,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(8,34,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(9,35,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(10,36,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(11,37,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(12,38,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(13,39,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(14,40,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(15,41,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(16,42,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(17,43,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(18,44,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(19,45,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(20,46,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(21,47,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(22,49,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(23,50,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(24,51,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(25,52,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(26,53,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(27,54,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(28,55,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(29,56,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(30,57,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(31,101,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(32,59,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(33,60,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(34,61,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(35,103,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(36,63,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(37,64,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(38,65,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(39,66,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(40,102,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(41,68,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(42,69,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(43,70,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(44,71,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(45,72,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(46,73,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(47,74,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(48,75,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(49,76,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(50,77,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(51,78,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(52,79,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(53,80,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(54,81,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(55,82,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(56,83,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(57,84,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(58,85,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(59,86,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(60,87,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(61,88,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(62,89,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(63,90,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(64,91,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(65,92,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(66,93,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(67,94,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(68,95,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(69,96,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(70,97,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(71,98,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(72,99,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(73,100,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(74,104,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(75,105,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(76,106,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(77,107,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(78,108,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(79,109,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(80,110,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(81,111,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(82,112,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(83,113,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(84,114,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(85,115,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(86,116,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(87,117,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(88,118,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(89,119,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(90,120,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(91,121,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(92,122,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(93,123,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(94,124,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(95,125,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(96,126,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(97,127,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(98,128,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(99,129,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(100,130,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(101,131,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(102,132,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(103,133,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(104,134,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(105,135,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(106,136,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(107,137,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(108,138,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(109,139,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(110,140,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(111,141,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(112,142,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(113,143,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(114,144,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(115,145,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(116,146,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(117,147,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(118,148,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(119,149,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(120,150,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(121,151,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(122,152,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(123,153,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(124,154,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(125,155,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(126,156,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(127,157,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(128,158,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(129,159,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(130,160,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(131,161,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(132,162,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(133,163,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(134,164,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(135,165,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(136,166,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(137,167,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(138,168,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(139,169,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(140,170,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(141,171,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(142,172,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(143,173,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(144,174,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(145,175,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(146,176,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(147,177,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(148,178,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(149,179,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(150,180,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(151,181,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(152,182,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(153,183,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(154,184,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(155,185,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(156,186,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(157,187,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(158,188,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(159,189,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(160,190,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(161,191,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(162,192,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(163,193,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(164,194,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(165,195,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(166,196,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(167,197,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(168,198,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(169,199,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77),(170,200,1,0,'2024-02-24 11:28:05','2024-02-24 11:28:05',77,77);

INSERT INTO `profilefor` VALUES (1,'Myself',NULL,1,0,'2024-01-16 11:48:58','2024-01-16 11:48:58',77,77),(2,'My Son','Male',0,0,'2024-01-16 11:48:58','2024-01-16 11:48:58',77,77),(3,'My Daughter','Female',1,0,'2024-01-16 11:48:58','2024-01-16 11:48:58',77,77),(4,'My Brother','Male',1,0,'2024-01-16 11:48:58','2024-01-16 11:48:58',77,77),(5,'My Sister','Female',1,0,'2024-01-16 11:48:58','2024-01-16 11:48:58',77,77),(6,'My Friend',NULL,1,0,'2024-01-16 11:48:58','2024-01-16 11:48:58',77,77),(7,'My Relative',NULL,1,0,'2024-01-16 11:48:58','2024-01-16 11:48:58',77,77),(8,'Brother','Male',1,0,'2024-01-31 11:09:21','2024-01-31 11:09:21',77,77),(9,'Sister',NULL,1,0,'2024-01-31 11:36:22','2024-01-31 11:36:22',77,77),(10,'Friend','Male',1,0,'2024-01-31 12:09:25','2024-01-31 12:09:25',77,77),(11,'Son','Male',1,0,'2024-01-31 12:09:41','2024-01-31 12:09:41',77,77);


CREATE TABLE `userpersonaldetailcustomdata` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `userId` INT NULL,
  `isActive` TINYINT NULL DEFAULT '1',
  `isDelete` TINYINT NULL DEFAULT '0',
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL DEFAULT NULL,
  `modifiedBy` VARCHAR(45) NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_userpersonaldetailcustomdata_user_idx` (`userId` ASC) ,
  CONSTRAINT `fk_userpersonaldetailcustomdata_user`
    FOREIGN KEY (`userId`)
    REFERENCES `users` (`id`)
    ON DELETE RESTRICT
    ON UPDATE RESTRICT);

    CREATE TABLE `customfields` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(100) NULL DEFAULT NULL,
  `displayName` VARCHAR(100) NULL DEFAULT NULL,
  `mappedTableName` VARCHAR(100) NULL DEFAULT NULL,
  `description` LONGTEXT NULL DEFAULT NULL,
  `valueTypeId` INT NULL DEFAULT NULL,
  `isRequired` TINYINT NULL DEFAULT NULL,
  `allowInSearch` TINYINT NULL DEFAULT NULL,
  `allowInFilter` TINYINT NULL DEFAULT NULL,
  `allowIncompleteProfile` TINYINT NULL DEFAULT NULL,
  `allowInPreferences` TINYINT NULL DEFAULT NULL,
  `defaultValue` LONGTEXT NULL DEFAULT NULL,
  `valueList` LONGTEXT NULL DEFAULT NULL,
  `isActive` TINYINT NULL DEFAULT '1',
  `isDelete` TINYINT NULL DEFAULT '0',
  `createdDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` INT NULL DEFAULT NULL,
  `modifiedBy` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`));

  INSERT INTO `flaggroup` (`id`, `flagGroupName`, `detail`, `displayOrder`) VALUES ('14', 'Modules', 'Modules', '8');
  INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`) VALUES ('45', '14', '7', 'isEnableCustomFields', 'Enable CustomFields', '1', '1');
  ALTER TABLE `valuetypes` 
ADD COLUMN `isShowInCustomField` TINYINT NULL DEFAULT NULL AFTER `modifiedBy`;
UPDATE `valuetypes` SET `isShowInCustomField` = '1' WHERE (`id` = '1');
UPDATE `valuetypes` SET `isShowInCustomField` = '1' WHERE (`id` = '2');
UPDATE `valuetypes` SET `isShowInCustomField` = '1' WHERE (`id` = '3');
UPDATE `valuetypes` SET `isShowInCustomField` = '1' WHERE (`id` = '10');
ALTER TABLE `customfields` 
CHANGE COLUMN `mappedTableName` `mappedFieldName` VARCHAR(100) NULL DEFAULT NULL ;
ALTER TABLE `customfields` 
CHANGE COLUMN `isRequired` `isRequired` TINYINT NULL DEFAULT '0' ,
CHANGE COLUMN `allowInSearch` `allowInSearch` TINYINT NULL DEFAULT '0' ,
CHANGE COLUMN `allowInFilter` `allowInFilter` TINYINT NULL DEFAULT '0' ,
CHANGE COLUMN `allowIncompleteProfile` `allowIncompleteProfile` TINYINT NULL DEFAULT '0' ,
CHANGE COLUMN `allowInPreferences` `allowInPreferences` TINYINT NULL DEFAULT '0' ;
ALTER TABLE `valuetypes` 
ADD COLUMN `isUseForFilter` TINYINT NULL DEFAULT NULL AFTER `isShowInCustomField`;
ALTER TABLE `valuetypes` 
ADD COLUMN `remark` VARCHAR(45) NULL DEFAULT NULL AFTER `isUseForFilter`;
UPDATE `valuetypes` SET `isUseForFilter` = '0' WHERE (`id` = '1');
UPDATE `valuetypes` SET `isUseForFilter` = '0' WHERE (`id` = '2');
UPDATE `valuetypes` SET `isUseForFilter` = '1' WHERE (`id` = '3');
UPDATE `valuetypes` SET `isUseForFilter` = '1' WHERE (`id` = '10');
ALTER TABLE `valuetypes` 
CHANGE COLUMN `remark` `remark` VARCHAR(200) NULL DEFAULT NULL ;
UPDATE `valuetypes` SET `remark` = 'If you enable this flag, the application may cause malware crash' WHERE (`id` = '1');
UPDATE `valuetypes` SET `remark` = 'If you enable this flag, the application may cause malware crash' WHERE (`id` = '2');
ALTER TABLE `userauthdata` 
CHANGE COLUMN `oAuthAccessToken` `oAuthAccessToken` LONGTEXT NULL DEFAULT NULL ,
CHANGE COLUMN `description` `description` LONGTEXT NULL DEFAULT NULL ;
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `isActive`, `isDelete`) VALUES ('46', '1', '7', 'isVerifyCustomerProfile', 'Verify Customer Profile', '1', '1', '1', '0');
ALTER TABLE `users` 
ADD COLUMN `isVerifyProfilePic` TINYINT NULL AFTER `isReceiveNotification`;
UPDATE `systemflags` SET `name` = 'isUserProfilePicApprove', `displayName` = 'User ProfilePic Approved', `description` = 'User Profile Pic Approved from admin' WHERE (`id` = '46');
ALTER TABLE `customfields` 
ADD COLUMN `completeprofilesectioname` VARCHAR(100) NULL DEFAULT NULL AFTER `valueList`;
ALTER TABLE `weight` 
CHANGE COLUMN `name` `name` INT NOT NULL ;
ALTER TABLE `userproposals` 
ADD COLUMN `hascancelled` TINYINT NULL DEFAULT '0' AFTER `modifiedBy`;

ALTER TABLE `customfields` 
ADD COLUMN `textLength` INT NULL DEFAULT NULL AFTER `isRequired`;

ALTER TABLE `userpersonaldetail` 
ADD COLUMN `memberid` VARCHAR(45) NULL AFTER `modifiedBy`,
ADD UNIQUE INDEX `memberid_UNIQUE` (`memberid` ASC) ;

ALTER TABLE `feedback` 
CHANGE COLUMN `isActive` `isActive` TINYINT NULL DEFAULT '0' ;

INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('51', '1', '4', 'copyrightText', 'CopyRight Text', '(©) Copyright 2024 Matrimony. All Rights Reserved.', '(©) Copyright 2024 Matrimony. All Rights Reserved.', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');

INSERT INTO `flaggroup` (`id`, `flagGroupName`, `detail`, `parentFlagGroupId`, `displayOrder`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('15', 'App Links', 'App Links', '1', '3', '1', '0', '2023-12-13 15:25:14', '2023-12-13 15:25:14', '1', '1');

INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('49', '15', '1', 'appstore', 'App Store', 'https://www.apple.com/in/app-store/', 'https://www.apple.com/in/app-store/', '1', '1', '0', '2023-12-13 15:28:26', '2023-12-13 15:28:26', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('50', '15', '1', 'playstore', 'Play Store', 'https://www.apple.com/in/app-store/', 'https://www.apple.com/in/app-store/', '1', '1', '0', '2023-12-13 15:28:26', '2023-12-13 15:28:26', '1', '1');

INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('52', '1', '4', 'facebookLink', 'Facebook Link', 'https://www.facebook.com/', 'https://www.facebook.com/', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('53', '1', '4', 'instagramLink', 'Instagram Link', 'https://www.instagram.com/', 'https://www.instagram.com/', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('54', '1', '4', 'twitterLink', 'Twitter Link', 'https://x.com/?lang=en', 'https://x.com/?lang=en', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('55', '1', '4', 'linkedinLink', 'Linkedin Link', 'https://in.linkedin.com/', 'https://in.linkedin.com/', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('56', '1', '4', 'threadsLink', 'Threads Link', 'https://www.threads.net/login/', 'https://www.threads.net/login/', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');

INSERT INTO `flaggroup` (`id`, `flagGroupName`, `detail`, `parentFlagGroupId`, `displayOrder`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('16', 'Social Links', 'Social Links', '1', '3', '1', '0', '2023-12-13 15:25:14', '2023-12-13 15:25:14', '1', '1');

UPDATE `systemflags` SET `flagGroupId` = '1', `valueTypeId` = '4' WHERE (`id` = '51');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1' WHERE (`id` = '52');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1' WHERE (`id` = '53');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1' WHERE (`id` = '54');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1' WHERE (`id` = '55');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1' WHERE (`id` = '56');

UPDATE `systemflags` SET `value` = 'https://www.threads.net/login/' WHERE (`id` = '56');
UPDATE `systemflags` SET `value` = 'https://in.linkedin.com/' WHERE (`id` = '55');
UPDATE `systemflags` SET `value` = 'https://x.com/?lang=en' WHERE (`id` = '54');
UPDATE `systemflags` SET `value` = 'https://www.instagram.com/' WHERE (`id` = '53');
UPDATE `systemflags` SET `value` = 'https://www.facebook.com/' WHERE (`id` = '52');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1', `value` = '(©) Copyright 2024 Matrimony. All Rights Reserved.' WHERE (`id` = '51');

UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1', `value` = '(©) Copyright 2024 Matrimony. All Rights Reserved.' WHERE (`id` = '51');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1' WHERE (`id` = '52');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1', `value` = 'https://www.instagram.com/' WHERE (`id` = '53');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1' WHERE (`id` = '54');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1', `value` = 'https://in.linkedin.com/' WHERE (`id` = '55');
UPDATE `systemflags` SET `flagGroupId` = '16', `valueTypeId` = '1' WHERE (`id` = '56');

INSERT INTO `flaggroup` (`id`, `flagGroupName`, `detail`, `parentFlagGroupId`, `displayOrder`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('17', 'App Name', 'App Name', '1', '3', '1', '0', '2023-12-13 15:25:14', '2023-12-13 15:25:14', '1', '1');

INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('57', '16', '1', 'appName', 'App Name', 'Matrimony', 'Matrimony', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');

INSERT INTO `flaggroup` (`id`, `flagGroupName`, `detail`, `parentFlagGroupId`, `displayOrder`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('18', 'Contact Us', 'Contact Us', '1', '3', '1', '0', '2023-12-13 15:25:14', '2023-12-13 15:25:14', '1', '1');

INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('58', '18', '1', 'Address', 'Address', '47 W 13th St, New York, NY 10011, USA', '47 W 13th St, New York, NY 10011, USA', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('59', '18', '1', 'Email', 'Email', 'support@matrimony.com', 'support@matrimony.com', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');
INSERT INTO `systemflags` (`id`, `flagGroupId`, `valueTypeId`, `name`, `displayName`, `value`, `defaultValue`, `autoRender`, `isActive`, `isDelete`, `createdDate`, `modifiedDate`, `createdBy`, `modifiedBy`) VALUES ('60', '18', '1', 'Phone Number', 'Phone Number', '9898989898', '9898989898', '1', '1', '0', '2023-12-27 12:06:37', '2023-12-27 12:06:37', '1', '1');

UPDATE `systemflags` SET `name` = 'address' WHERE (`id` = '58');
UPDATE `systemflags` SET `name` = 'email' WHERE (`id` = '59');
UPDATE `systemflags` SET `name` = 'phoneNumber' WHERE (`id` = '60');