
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);



DROP TABLE IF EXISTS `currencies`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
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 ;


DROP TABLE IF EXISTS `paymentgateway`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = 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, \"></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 ;

DROP TABLE IF EXISTS `weight`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
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');





