ALTER TABLE `applicantver_tb`  ADD `Counter` INT NOT NULL DEFAULT '0' COMMENT 'Count the number of send'  AFTER `VDate`;
ALTER TABLE `school_tb` ADD `OpUName` TEXT NULL DEFAULT NULL COMMENT 'The SMS gateway user name' AFTER `OpEmailLive`, ADD `OpUPassw` TEXT NULL DEFAULT NULL COMMENT 'The SMS gateway password' AFTER `OpUName`;
UPDATE `school_tb` SET `OpUName` = 'enefiokduke@aksu.edu.ng' WHERE `school_tb`.`ID` = 1;
UPDATE `school_tb` SET `OpUPassw` = 'f4dd291643903ecc1068bbf34cbd7a838bedfdbf' WHERE `school_tb`.`ID` = 1;
UPDATE `menu_tb` SET `Tabs` = 'Bdata=Records&PreLoader=Class List&MonitorReg=Monitor Reg.&StudReg=Stud. Reg. (R)&jambReg=Load Reg.No.&SSetting=Settings&Strans=Transfer' WHERE `menu_tb`.`ID` = 1;
ALTER TABLE `studentinfo_tb` CHANGE `ClassID` `ClassID` INT(11) NOT NULL DEFAULT '0' COMMENT 'The Class the student falls, from studentclass_tb';
UPDATE studentinfo_tb SET ClassID = 0;
UPDATE `menu_tb` SET `Tabs` = 'Bdata=Records&PreLoad=Class List&MonitorReg=Monitor Reg.&StudReg=Stud. Reg. (R)&jambReg=Load Reg.No.&SSetting=Settings&Strans=Transfer' WHERE `menu_tb`.`ID` = 1;
***NUCO
***IMP

--Upload - studentset_tb
***NUCO
***IMP


ALTER TABLE `studentinfo_tb` CHANGE `RegNo` `RegNo` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `studentinfo_tb` CHANGE `OtherNames` `OtherNames` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `studentinfo_tb` CHANGE `DOB` `DOB` DATE NULL DEFAULT NULL;
ALTER TABLE `studentinfo_tb` CHANGE `JambNo` `JambNo` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `studentinfo_tb` CHANGE `Passport` `Passport` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `studentinfo_tb` CHANGE `MaritalStatus` `MaritalStatus` VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'S';
ALTER TABLE `studentinfo_tb` CHANGE `Nationality` `Nationality` VARCHAR(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `studentinfo_tb` CHANGE `Religion` `Religion` VARCHAR(60) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `studentinfo_tb` CHANGE `Email` `Email` VARCHAR(300) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `studentinfo_tb` CHANGE `Addrs` `Addrs` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL, CHANGE `NName` `NName` VARCHAR(300) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL, CHANGE `NAddrs` `NAddrs` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL, CHANGE `Nphone` `Nphone` VARCHAR(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL, CHANGE `RegDate` `RegDate` DATE NULL DEFAULT NULL, CHANGE `OlevelRstDetails` `OlevelRstDetails` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL, CHANGE `OlevelRst` `OlevelRst` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL, CHANGE `OtherDet` `OtherDet` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'Contain any other custom details in json format';
ALTER TABLE `studentinfo_tb` CHANGE `JambAgg` `JambAgg` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `studentinfo_tb` CHANGE `RegLevel` `RegLevel` INT(10) NOT NULL DEFAULT '0';
***NUCO
***IMP

--set index for Phone and ClassID in studentinfo_tb
***NUCO
***IMP

ALTER TABLE `order_tb`  ADD `TransLevel` INT NOT NULL DEFAULT '0' COMMENT '0-Initialized, 1-Redirected to gateway, 2 - bank slip printed, 3 - Receive response from gateway, 4 - bank fetch details, 5-bank send notification'  AFTER `PayScope`;
***NUCO
***IMP

-- copy order_tb structure only to create order_ex_tb
***NUCO
***IMP

ALTER TABLE `order_ex_tb`  ADD `Issue` TEXT NULL DEFAULT NULL COMMENT 'The issue with the transaction'  AFTER `TransLevel`;
ALTER TABLE `school_tb`  ADD `UniqueTransID` VARCHAR(255) NULL DEFAULT 'FALSE'  AFTER `OpUPassw`;
ALTER TABLE `school_tb` CHANGE `UniqueTransID` `UniqueTransID` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT 'FALSE' COMMENT 'Always generate a new/unique Transaction ID for every transaction post to gateway';
***NUCO
***IMP

ALTER TABLE `order_tb` CHANGE `BrkDwn` `BrkDwn` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT 'ItemName~Amt~ID~Optional(1:0)~Disabled(1:0)';
***NUCO
***IMP

ALTER TABLE `studentinfo_tb` CHANGE `RegNo` `RegNo` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
***IMP
***NUCO

ALTER TABLE `school_tb` ADD `BulkPayUpdate` ENUM('FALSE','TRUE') NOT NULL DEFAULT 'FALSE' COMMENT 'Allow bulk update of payment during bulk course registration' AFTER `UniqueTransID`;
***NUCO
***IMP

ALTER TABLE `school_tb` ADD `OpSMSLive` ENUM('TRUE','FALSE') NOT NULL DEFAULT 'FALSE' COMMENT 'Determine if SMS is allowerd or not' AFTER `OpUPassw`;
***NUCO
***IMP

ALTER TABLE `school_tb` ADD `SemLabel` VARCHAR(255) NULL DEFAULT 'Semester' AFTER `BulkPayUpdate`;
***NUCO
***IMP

ALTER TABLE `payhistory_tb`  ADD `ProgID` INT NOT NULL DEFAULT '0' COMMENT 'Holds the programe this payment is meant for'  AFTER `PayScope`;
***NUCO
***IMP

ALTER TABLE `order_tb`  ADD `ProgID` INT NOT NULL DEFAULT '0' COMMENT 'Holds the programe this payment is meant for'  AFTER `TransLevel`;
***NUCO
***IMP

ALTER TABLE `order_ex_tb`  ADD `ProgID` INT NOT NULL DEFAULT '0'  AFTER `Issue`;
***NUCO
***IMP

ALTER TABLE `school_tb` ADD `PayVerifyType` ENUM('DEEP','SHALLOW') NOT NULL DEFAULT 'SHALLOW' COMMENT 'SHALLOW - local verification only, DEEP - both local and gateway verification.' AFTER `SemLabel`;
***NUCO
***IMP

ALTER TABLE `order_tb` CHANGE `Amt` `Amt` DOUBLE(12,2) NOT NULL;
***NUCO
***IMP

ALTER TABLE `order_ex_tb` CHANGE `Amt` `Amt` DOUBLE(12,2) NOT NULL;
***NUCO
***IMP

ALTER TABLE `payhistory_tb` CHANGE `Amt` `Amt` DOUBLE(12,2) NOT NULL;
***NUCO
***IMP

ALTER TABLE `school_tb` ADD `SchStartSes` INT NOT NULL DEFAULT '1' COMMENT 'The session academa commence in the school' AFTER `PayVerifyType`, ADD `SchStartSem` INT NOT NULL DEFAULT '1' COMMENT 'The Semester Academa Comence' AFTER `SchStartSes`;
***NUCO
***IMP

run Updates/paymentprogpatch.php
***NUCO
***IMP

ALTER TABLE `pstudentinfo_tb` ADD `ClassID` INT NOT NULL DEFAULT '0' AFTER `OtherDet`;
***SCG
***IMP
***NUCO

UPDATE `new_apply_tb` SET `PageControl` = '{\"1\":{\"PC_Email\":true,\"PC_Phone\":false},\"5\":{\"PC_Mailing\":false,\"PC_Occupation\":false},\"7\":{\"PC_Degree\":false,\"PC_Class\":false,\"PC_AreaSpec\":false,\"PC_SchoolMode\":false,\"PC_ResearchTopic\":false}}' WHERE `new_apply_tb`.`ID` = 6;
***IMP
***NUCO
***SCG

ALTER TABLE `resultinfo_tb` ADD `ResultAttr` LONGTEXT NULL DEFAULT NULL COMMENT '[ {"GN":"PSYCHOMOTOR","ATTR":"Seperated with comma","ENABLE":1},...]' AFTER `PortalResultDisplay`;
***NUCO
***IMP


UPDATE `resultinfo_tb` SET `ResultAttr` = '[{"GN":"PSYCHOMOTOR","ATTR":"Honesty, Obedience, Punctuality, Self Control, Sociality, Skill","REMARK":"FAIR, GOOD, VERY GOOD, EXCELENT","DEF":"GOOD","ENABLE":1},{"GN":"AFFECTIVENESS","ATTR":"Sports, Handling of Tools, Communication Skills, Painting & Drawing, Politness","REMARK":"FAIR, GOOD, VERY GOOD, EXCELENT","DEF":"GOOD","ENABLE":1}]' WHERE `resultinfo_tb`.`ID` = 1;
***NUCO
***IMP

ALTER TABLE `result_tb` ADD `OtherResult` TEXT NULL DEFAULT NULL AFTER `OAS`, ADD `TComment` TEXT NULL DEFAULT NULL AFTER `OtherResult`, ADD `HTComment` TEXT NULL DEFAULT NULL AFTER `TComment`;
***NUCO
***IMP

ALTER TABLE `resultinfo_tb` ADD `ViewOnApprove` INT NOT NULL DEFAULT '1' COMMENT '1=>Result is visible only on approval, 0-result is visible even when not approved' AFTER `ResultAttr`;
***NUCO
***IMP

ALTER TABLE `new_apply_group_tb`  ADD `MenuOrder` INT NOT NULL DEFAULT '1' COMMENT 'Ordering'  AFTER `Color`;
***IMP
***NUCO

ALTER TABLE `new_apply_tb`  ADD `MenuOrder` INT NOT NULL DEFAULT '1' COMMENT 'Ordering'  AFTER `PageControl`;
***IMP
***NUCO

ALTER TABLE `new_apply_tb`  ADD `PayID` INT NOT NULL DEFAULT '0' COMMENT '0-No Payment Required'  AFTER `MenuOrder`,  ADD `PayBases` INT NOT NULL DEFAULT '1' COMMENT '1-Semester/Term Bases, 2-Level Bases, 3-Programme Bases'  AFTER `PayID`;
***IMP
***NUCO

ALTER TABLE `resultinfo_tb`  ADD `PrePayBases` INT NOT NULL DEFAULT '1' COMMENT '1-Semester Bases, 2-Level Bases'  AFTER `ViewOnApprove`;
***NUCO
***IMP

ALTER TABLE `resultinfo_tb` CHANGE `PrePayBases` `PrePayBases` INT(11) NOT NULL DEFAULT '1' COMMENT '1-Full Semester Payment, 2-Part Semester Payment';
***NUCO
***IMP

ALTER TABLE `school_tb`  ADD `AppInstall` INT NOT NULL DEFAULT '1' COMMENT '1-Installabe, 0-dont prompt installation'  AFTER `SchStartSem`;
***WOGIS
***NUCO
***IMP

ALTER TABLE `school_tb`  ADD `AppThemeColor` VARCHAR(255) NOT NULL DEFAULT '#E53456' COMMENT 'The PWA theme color to be use in index page'  AFTER `AppInstall`;
***WOGIS
***NUCO
***IMP

Upload ./icons/sc.png
***WOGIS
***NUCO
***IMP

INSERT INTO `new_apply_group_tb` (`ID`, `Name`, `Descr`, `Logo`, `Enable`, `Scope`, `Color`, `MenuOrder`) VALUES (NULL, 'Wallet', 'Perform Deposit, Transfer and View your wallet Details', 'mbri-briefcase', '1', 'MAIN', 'w3-lime', '4');
***NUCO
***IMP

Update GroupID to Wallet ID from new_apply_group_tb in new_apply_tb for (Deposit, Withdrawer, Transfer and Account)
Update Dir in new_apply_tb for (Deposit=>Wallet/Deposit, Withdrawer=>Wallet/Withdrawal, Transfer=>Wallet/Transfer and Account=>Wallet/Account)
***NUCO
***IMP

ALTER TABLE `payhistory_tb` ADD `FromWallet` INT NOT NULL DEFAULT '0' COMMENT '0=>Not From Wallet(Card or Bank), 1>From wallet' AFTER `ProgID`;
***NUCO
***IMP

ALTER TABLE `walletcontrol_tb`  ADD `MenuID` INT NOT NULL DEFAULT '13' COMMENT 'ID from new_apply_group_tb'  AFTER `MinBalance`;
***NUCO
***IMP

INSERT INTO `new_apply_tb` (`ID`, `Name`, `Descr`, `GroupID`, `Logo`, `Enable`, `Status`, `Color`, `Placeholder`, `Dir`, `GlobalData`, `Pages`, `PageControl`, `MenuOrder`, `PayID`, `PayBases`) VALUES (NULL, 'Confirm', 'Confirm pending Payment', '3', 'mbri-setting', '1', 'OPENED', 'w3-orange', 'textbox', 'Payment/Confirm', NULL, NULL, NULL, '4', '0', '1');
//Confirm the GroupID and insert apropriately
***NUCO
***IMP

ALTER TABLE `order_tb`  ADD `ExpiredRef` TEXT NULL DEFAULT NULL COMMENT ':Ref1::Ref2::Ref3:'  AFTER `ProgID`;
***NUCO
***IMP

UPDATE `menu_tb` SET `Tabs` = 'Compose=Compose&Mmonitor=Monitor&Inbox=Inbox&Draft=Draft&Sent=Sent&webmail=Web Mail' WHERE `menu_tb`.`ID` = 5;
***NUCO
***IMP


ALTER TABLE `menu_tb`  ADD `ExtURL` TEXT NULL DEFAULT NULL COMMENT 'Url to external module'  AFTER `GrpOrder`;
UPDATE `menu_tb` SET `Tabs` = 'Compose=Compose&Mmonitor=Monitor&Inbox=Inbox&Draft=Draft&Sent=Sent&webmail=Web Mail~../../webmail' WHERE `menu_tb`.`ID` = 5;
***NUCO
***IMP

ALTER TABLE `resultinfo_tb`  ADD `SettingName` VARCHAR(255) NOT NULL DEFAULT 'Main Setting' COMMENT 'Setting Label'  AFTER `PrePayBases`;
ALTER TABLE `schgrade_tb` ADD `RstInfoID` INT(11) NOT NULL DEFAULT '1' COMMENT 'The ID of the resultinfo_tb that owns the grade' AFTER `PASS`;
ALTER TABLE `classofpass_tb`  ADD `RstInfoID` INT(11) NOT NULL DEFAULT '1' COMMENT 'The ID of the resultinfo_tb that owns the classofpass'  AFTER `SchoolID`;
ALTER TABLE `scorestruc_tb`  ADD `RstInfoID` INT(11) NOT NULL DEFAULT '1' COMMENT 'The ID of the resultinfo_tb that owns the score structure'  AFTER `MaxScore`;
ALTER TABLE `result_tb`  ADD `RstInfoID` INT(11) NOT NULL DEFAULT '1' COMMENT 'The ID of the resultinfo_tb that this result use'  AFTER `HTComment`;
ALTER TABLE `resultapprove_tb`  ADD `RstInfoID` INT(11) NOT NULL DEFAULT '1'  AFTER `ScoreStrucMax`;
***WOGIS
***IMP
***NUCO

ALTER TABLE `studentset_tb` ADD `AutoAdmission` ENUM('DISABLE','ADMIT','CREATE') NOT NULL DEFAULT 'DISABLE' COMMENT 'Admit=>Automatically Admit, Create=>Automatically create student account' AFTER `DisplayStudData`;
***IMP
***NUCO
***WOGIS

CREATE TABLE `eduporta_db`.`resultcontrol_tb` ( `ID` INT NOT NULL AUTO_INCREMENT , `CheckRstMenuID` INT NOT NULL DEFAULT '0' COMMENT 'The id of the apply_tb id for student checker module' , `Descr` TEXT NULL DEFAULT NULL , PRIMARY KEY (`ID`)) ENGINE = InnoDB;

UPDATE `menu_tb` SET `Tabs` = 'wallPaper=Wall Paper&colorscheme=Appearance&pmenus=Menus&menuset=Settings' WHERE `menu_tb`.`ID` = 13;

ALTER TABLE `portal_tb`  ADD `MenuLink` TEXT NULL DEFAULT NULL COMMENT 'json containing portal menus and there linked operations'  AFTER `BrandLogo`;

ALTER TABLE `pstudentinfo_tb` CHANGE `admitted` `admitted` INT(11) NOT NULL DEFAULT '0';

ALTER TABLE `coursereg_tb` ADD `Bulk` INT NOT NULL DEFAULT '0' COMMENT 'Indicate if registered as bulk registration' AFTER `TotCH`;
***AKSU
***NUCO
***IMP
***WOGIS

ALTER TABLE `cbt_schedule_tb` ADD `UserID` INT NOT NULL DEFAULT '1' AFTER `ExmID`;
***IMP
***WOGIS
***AKSU
***NUCO

ALTER TABLE `cbt_schedule_tb` ADD `TotQuestionAllocation` TEXT NULL DEFAULT NULL AFTER `TotQuestion`;
ALTER TABLE `cbt_schedule_tb` ADD `Scope` INT(1) NOT NULL DEFAULT '0' AFTER `UserID`;
***NUCO
***IMP
***WOGIS
***AKSU

#animate.css in required folder
***IMP
***WOGIS
***AKSU
***NUCO


ALTER TABLE `school_tb` ADD `AutoRegNoTrigger` ENUM('COURSE','STUDACCOUNT') NOT NULL DEFAULT 'COURSE' COMMENT 'The operations that triggers registration number generation' AFTER `AppThemeColor`;
***IMP
***WOGIS
***AKSU
***NUCO

#Upload FA515
***IMP
***WOGIS
***AKSU
***NUCO

#Upload notification_tb (structure only)
***IMP
***WOGIS
***AKSU
***NUCO

#epcore
***IMP
***WOGIS
***AKSU
***NUCO

#add notification menu
***IMP
***WOGIS
***AKSU
***NUCO

#set color field for every sub menu using cportal Portal>>Menu module
***AKSU
***IMP
***WOGIS
***NUCO

#epcore
***AKSU
***NUCO

#Upload swcp.js in portal root
***AKSU
***NUCO
***WOGIS
***IMP

#save application setting from cportal to create require files
***AKSU
***NUCO

ALTER TABLE `staff_tb` CHANGE `Phone` `Phone` VARCHAR(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
***NUCO
***WOGIS
***AKSU
***IMP

#epcore (28/6/21 - Staff Phone Copy module)
***NUCO


ALTER TABLE `coursecontrol_tb` ADD `DynamicBulkRegLvl` ENUM('TRUE','FALSE') NOT NULL DEFAULT 'FALSE' COMMENT 'Allow dynamic level selection in cportal bulk course registration' AFTER `AdminPrePay`;
***WOGIS
***AKSU
***NUCO
***IMP

#epcore (3/7/21 - Dynamic level selection control in bulk course registration)
***WOGIS

#import new_apply_group_sub_tb (5/8/21)
***AKSU
***NUCO
***IMP
***WOGIS

TRUNCATE TABLE `new_apply_group_sub_tb`
ALTER TABLE `new_apply_tb` ADD `GroupSubID` INT NOT NULL DEFAULT '0' AFTER `GroupID`;
***AKSU
***NUCO
***IMP
***WOGIS

#Export data only from new_apply_tb as csv (only new_apply_group_sub_tb fields - `ID`, `Name`, `Descr`, `GroupID`, `Logo`, `Enable`, `Status`, `Color`, `Placeholder`, `MenuOrder`)
***AKSU
***NUCO
***IMP
***WOGIS

#import into new_apply_group_sub_tb
***AKSU
***NUCO
***IMP
***WOGIS

UPDATE `new_apply_tb` SET `GroupSubID`=ID
***AKSU
***NUCO
***IMP
***WOGIS

ALTER TABLE `putme` CHANGE `Verify` `Verify` ENUM('STUDENT','NONE','PHONE') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
***AKSU
***NUCO
***IMP
***WOGIS

#epcore (22/08/21 - Menu clustering, phase 1 student info bank implementation)
***NUCO
***IMP
***WOGIS

#epcore (22/08/21 - fix: empty name in payment slip)

#epcore (14/09/21 - upgrade: added use file_get_content as another option for internal request instead of curl only. add protocol and UseCURLs attribute to config)

25/9/2021
ALTER TABLE `pstudentinfo_tb` ADD INDEX(`Phone`);
ALTER TABLE `pstudentinfo_tb` ADD `AdmSes` INT NOT NULL DEFAULT '0' AFTER `ClassID`;
ALTER TABLE `pstudentinfo_tb` CHANGE `AdmSes` `AdmSes` INT NOT NULL DEFAULT '0' AFTER `StartSes`;
ALTER TABLE `pstudentinfo_tb` ADD INDEX(`AdmSes`);
***NUCO
***IMP

#aksu => ALTER TABLE `jstudentinfo_tb` ADD `AdmSes` INT NOT NULL DEFAULT '0' AFTER `ClassID`;
#aksu => ALTER TABLE `jstudentinfo_tb` CHANGE `AdmSes` `AdmSes` INT NOT NULL DEFAULT '0' AFTER `StartSes`;
#aksu => ALTER TABLE `jstudentinfo_tb` ADD INDEX(`AdmSes`);

ALTER TABLE `studentinfo_tb` ADD INDEX(`ModeOfEntry`);
ALTER TABLE `studentinfo_tb` ADD `JmbComb` TEXT NULL DEFAULT NULL AFTER `AdminDate`;
ALTER TABLE `studentinfo_tb` ADD `OlevelRst2` TEXT NULL DEFAULT NULL AFTER `OlevelRst`;
ALTER TABLE `studentinfo_tb` ADD `PUTMECombID` VARCHAR(100) NULL DEFAULT NULL AFTER `OtherCert`, ADD `SeatNo` VARCHAR(100) NULL DEFAULT NULL AFTER `PUTMECombID`, ADD `VenueID` INT NOT NULL DEFAULT '0' AFTER `SeatNo`, ADD INDEX `VenueID` (`VenueID`);
ALTER TABLE `studentinfo_tb` ADD `admitted` INT NOT NULL DEFAULT '0' COMMENT '0-Not Yet Admited; 1-Admitted' AFTER `VenueID`;
***IMP

ALTER TABLE `pstudentinfo_tb` ADD `AutoGenReg` ENUM('TRUE','FALSE') NOT NULL DEFAULT 'FALSE' COMMENT 'Indicate if the Student Registration Number is Generated using the system auto regnum generation feature' AFTER `OtherDet`, ADD `AutoNum` INT NOT NULL DEFAULT '0' COMMENT 'The AutoNum generated for the RegNo (AUTONUM - in Formart)' AFTER `AutoGenReg`;
***IMP

ALTER TABLE `pstudentinfo_tb` ADD `AutoGenReg` ENUM('TRUE','FALSE') NOT NULL DEFAULT 'FALSE' COMMENT 'Indicate if the Student Registration Number is Generated using the system auto regnum generation feature' AFTER `OtherDet`, ADD `AutoNum` INT NOT NULL DEFAULT '0' COMMENT 'The AutoNum generated for the RegNo (AUTONUM - in Formart)' AFTER `AutoGenReg`;
***NUCO

#epcore (25/9/2021 - use ob_start and ob_content instead of curl ) - V5.1
AKSU

ALTER TABLE `wallet_tb` CHANGE `ID` `ID` INT(11) NOT NULL AUTO_INCREMENT;
AKSU
***WOGIS
***IMP
***NUCO

ALTER TABLE `walletcontrol_tb` ADD `DynamicAmt` INT NOT NULL DEFAULT '0' COMMENT '1=>Allowed, 0=>Disallowed' AFTER `MenuID`; 
***NUCO
***AKSU
**IMP
**IMP, CG

INSERT INTO `new_apply_group_sub_tb` (`ID`, `Name`, `Descr`, `GroupID`, `Logo`, `Enable`, `Status`, `Color`, `Placeholder`, `MenuOrder`) VALUES (NULL, 'Verify Payment', 'Verify and update pending transactions', '1', 'mbri-credit-card', '1', 'OPENED', 'w3-pink', 'textbox', '6');
***AKSU
***IMP
***IMP, CG
***NUCO

#=> replace the AI ID in next query
INSERT INTO `new_apply_tb` (`ID`, `Name`, `Descr`, `GroupID`, `GroupSubID`, `Logo`, `Enable`, `Status`, `Color`, `Placeholder`, `Dir`, `GlobalData`, `Pages`, `PageControl`, `MenuOrder`, `PayID`, `PayBases`) VALUES (NULL, 'Verify Payment', 'Verify and update pending payment', '1', '50', 'mbri-credit-card', '1', 'OPENED', 'w3-pink', 'textbox', 'Payment/Verify', '{\"FormID\":1}', '[1,2,3,4,5]', NULL, '6', '0', '1'); 
***AKSU
***IMP,CG
***NUCO

#epcore (24/1/2022 - dynamic wallet amount, general payment verification - works both before and after login ) - V5.1
***NUCO
***AKSU

ALTER TABLE `resultinfo_tb` ADD `PinVerify` ENUM('TRUE','FALSE') NOT NULL DEFAULT 'FALSE' AFTER `SettingName`;
***UM
***UB
***YM
***AKSU
***IMP
***IMP, CG
***WIZ
***NUCO

CREATE TABLE `pin_tb` ( `ID` INT(11) NOT NULL AUTO_INCREMENT , `Pin` VARCHAR(255) NOT NULL , `DateGen` DATETIME NOT NULL , `PinUsage` INT(11) NOT NULL , `ExpiryDate` DATETIME NOT NULL , `AssignedStudent` VARCHAR(255) NOT NULL , `ValidationNo` VARCHAR(255) NOT NULL , `RstID` INT(11) NOT NULL , `MaxUsage` INT(11) NOT NULL , `Printed` TINYINT NOT NULL , `PrintDate` DATETIME NOT NULL , PRIMARY KEY (`ID`)) ENGINE = InnoDB;
***UM
***YM
***AKSU
***IMP
***IMP,CG
***WIZ
***NUCO

#add \academa\Payment\finishproxy.php to the portal access directory
#update \academa\starter.php to the portal access directory
***YM
***AKSU
***NUCO

#epcore (4/2/2022 - finish payment script proxy redirection, result pin verification) - V5.1
***YM
***AKSU
***WIZ
***NUCO

ALTER TABLE `putme`  ADD `CheckAdm` INT NOT NULL DEFAULT '1' COMMENT 'Check if candidate is admitted (0=>dont check, 1=>Check)'  AFTER `Param`;
***UB
***IMP
***IMP,CG
***AKSU,YM
***WIZ
***NUCO

INSERT INTO `menu_tb` (`ID`, `Script`, `GName`, `DName`, `Tabs`, `Logo`, `GrpOrder`, `ExtURL`) VALUES (NULL, '', 'util', 'Utility', 'pin=PIN', 'toolbox', '8', NULL);
UPDATE `menu_tb` SET `Tabs` = 'pinmgt=PIN' WHERE `menu_tb`.`ID` = 17;
UPDATE `menu_tb` SET `Logo` = 'chalkboard-teacher' WHERE `menu_tb`.`ID` = 4;
UPDATE `menu_tb` SET `Logo` = 'sign-in-alt' WHERE `menu_tb`.`ID` = 3;
UPDATE `menu_tb` SET `Logo` = 'credit-card' WHERE `menu_tb`.`ID` = 8;
UPDATE `menu_tb` SET `Logo` = 'comments' WHERE `menu_tb`.`ID` = 9;
UPDATE `menu_tb` SET `Logo` = 'newspaper' WHERE `menu_tb`.`ID` = 2;
***IMP
***IMP,CG
**UB
***AKSU,YM
***WIZ
***NUCO

ALTER TABLE `pin_tb` CHANGE `PinUsage` `PinUsage` INT NOT NULL DEFAULT '0', CHANGE `ExpiryDate` `ExpiryDate` DATETIME NULL DEFAULT NULL, CHANGE `AssignedStudent` `AssignedStudent` VARCHAR(255) NOT NULL DEFAULT '', CHANGE `RstID` `RstID` INT NULL DEFAULT '0', CHANGE `Printed` `Printed` TINYINT NOT NULL DEFAULT '0' COMMENT '0=>Not Printed, 1=>Printed', CHANGE `PrintDate` `PrintDate` DATETIME NULL DEFAULT NULL;
***AKSU,YM
***WIZ
***NUCO

ALTER TABLE `pin_tb` CHANGE `RstID` `RstID` INT(11) NULL DEFAULT NULL;
***IMP
***IMP, CG, ATCOI
***AKSU,YM
***WIZ
***NUCO

ALTER TABLE `pin_tb` CHANGE `ValidationNo` `ValidationNo` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;
***IMP
***IMP, CG, ATCOI
***AKSU,YM
***NUCO


ALTER TABLE `pin_tb` CHANGE `AssignedStudent` `AssignedStudent` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;
***IMP,CG,ATCOI
***AKSU,YM
***NUCO


ALTER TABLE `pin_tb` CHANGE `DateGen` `DateGen` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;
***IMP, CG
***NUCO

ALTER TABLE `item_tb`  ADD `PayOption` ENUM('BOTH','CARD','BANK') NOT NULL DEFAULT 'BOTH'  AFTER `MultiOrder`;
ALTER TABLE `item_tb` CHANGE `PayOption` `PayOption` ENUM('ALL','CARD','BANK','WALLET','BANK-CARD','BANK-WALLET','CARD-WALLET') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'ALL';
***AKSU,YM
***WIZ
***NUCO

ALTER TABLE `studentinfo_tb`  ADD `Enable` INT NOT NULL DEFAULT '1' COMMENT '0=>Disable Student Account, 1=>Enable Student Account'  AFTER `ClassID`;
ALTER TABLE `pstudentinfo_tb`  ADD `Enable` INT NOT NULL DEFAULT '1' COMMENT '0=>Disable Student Account, 1=>Enable Student Account'  AFTER `ClassID`;
#aksu => ALTER TABLE `jstudentinfo_tb`  ADD `Enable` INT NOT NULL DEFAULT '1' COMMENT '0=>Disable Student Account, 1=>Enable Student Account'  AFTER `ClassID`;
***AKSU,YM
***NUCO

ALTER TABLE `order_tb` ADD `CheckSum` VARCHAR(255) NULL DEFAULT NULL AFTER `ExpiredRef`; 
ALTER TABLE `payhistory_tb` ADD `CheckSum` TEXT NULL DEFAULT NULL AFTER `FromWallet`; 
ALTER TABLE `order_tb` CHANGE `CheckSum` `CheckSum` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;
***AKSU,YM
***NUCO

ALTER TABLE `schoolpayment_tb` ADD `AutoLevel` ENUM('TRUE','FALSE') NOT NULL DEFAULT 'TRUE' COMMENT 'Auto load student payment based on the last payment, FALSE - load student payment based on his expected level (note if calculated level is not expected level dont allow)' AFTER `SessionCheck`;
***AKSU,YM
***NUCO

#import new_country_tb
#import new_states_tb
***WIZ,YM,AKSU,NUCO

#import cbt_studentquestions_tb
***WIZ,YM,AKSU,NUCO

ALTER TABLE `walletcontrol_tb` ADD `AmtDescr` LONGTEXT NULL DEFAULT NULL COMMENT 'the description of individual Amt' AFTER `DynamicAmt`; 
***YM,AKSU,NUCO

ALTER TABLE `schoolpayment_tb` ADD `AllowInNewSession` ENUM('TRUE','FALSE') NOT NULL DEFAULT 'TRUE' COMMENT 'Overlook prevous payment checking in a new session' AFTER `AutoLevel`;
ALTER TABLE `schoolpayment_tb` CHANGE `AllowInNewSession` `Progressive` ENUM('TRUE','FALSE') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'TRUE' COMMENT 'use student last payment to determin next payment';
***YM,NUCO,AKSU

ALTER TABLE `school_degrees_tb` ADD `Duration` TEXT NULL DEFAULT NULL AFTER `Years`;
-- YM,WIZ,AKSU,NUCO

INSERT INTO `report_tb` (`ID`, `Title`, `Descr`, `Marker`, `Script`, `Param`, `Enable`, `Logo`, `Signatories`, `Content`) VALUES (NULL, 'MAIN', 'Generate/View Master Result Sheet', 'ResultMasterSheet', 'Reports/Exams/resultMaster.php', 'orientation=L&MB=43&MT=53&type=', '1', 'list-alt', '{\"HEAD OF DEPARTMENT\":{\"1\":\"\",\"2\":\"\",\"#\":\"\",\"3\":\"\"},\"DEAN\":{\"1\":\"\",\"2\":\"\",\"#\":\"\",\"3\":\"\",\"SENATE APPROVAL\":{\"3\":\"\",\"#\":\"\"}},\"CHAIRMAN, SERVC\":{\"1\":\"\",\"2\":\"\",\"#\":\"\",\"3\":\"\"}}', ''); 
-- AKSU,NUCO,IMP

UPDATE `menu_tb` SET `Tabs` = 'RUpload=Result Upload&RAprov=Approval&RSheet=Results (R)&MMS=Master (R)&exsetting=Settings&rstfix=Fixer&studledger=Result Ledger' WHERE `menu_tb`.`ID` = 6; 

INSERT INTO `report_tb` (`ID`, `Title`, `Descr`, `Marker`, `Script`, `Param`, `Enable`, `Logo`, `Signatories`, `Content`) VALUES (NULL, 'MAIN', 'Generate/View Student Result Ledger ', 'ResultLedgerSheet', 'Reports/Exams/ledger.php', 'orientation=L&MB=43&MT=38&type=', '1', 'list-alt', '{\"HEAD OF DEPARTMENT\":{\"1\":\"\",\"2\":\"\",\"#\":\"\",\"3\":\"\"},\"DEAN\":{\"1\":\"\",\"2\":\"\",\"#\":\"\",\"3\":\"\",\"SENATE APPROVAL\":{\"3\":\"\",\"#\":\"\"}},\"CHAIRMAN, SERVC\":{\"1\":\"\",\"2\":\"\",\"#\":\"\",\"3\":\"\"}}', '');
