
ALTER TABLE `xoops_adm_teacher` CHANGE `DOB` `DOB` DATE NOT NULL DEFAULT '1900-01-01', CHANGE `regDae` `regDae` DATE NOT NULL DEFAULT '1900-01-01'; 

UPDATE xoops_adm_teacher SET DOB='1900-01-01' , regDae='1900-01-01' WHERE id<>'' 

ALTER TABLE `xoops_adm_teacher` ADD `tstamp` INT(20) NOT NULL AFTER `fprint03`; 

ALTER TABLE `xoops_pc_punchrecord` CHANGE `punchDate` `punchDate` DATE NOT NULL DEFAULT '1900-01-01', CHANGE `punchOutDate` `punchOutDate` DATE NOT NULL DEFAULT '1900-01-01'; 

UPDATE xoops_pc_punchrecord SET `punchDate`='1900-01-01', `punchOutDate`='1900-01-01';

ALTER TABLE `xoops_pc_punchrecord` ADD `tstamp` INT(20) NOT NULL AFTER `levEarly`; 

RENAME TABLE `xoops_adm_teacher` TO `punchsys_staff`; 
RENAME TABLE `xoops_pc_exsttg ` TO `punchsys_exsttg`; 

RENAME TABLE `xoops_pc_section` TO `punchsys_section`;

RENAME TABLE `xoops_pc_punchrecord` TO `punchsys_punchrecord`;

RENAME TABLE `xoops_pc_remarkrecord` TO `punchsys_remarkrecord`;

ALTER TABLE `punchsys_remarkrecord` CHANGE `remarkDate` `remarkDate` DATE NOT NULL DEFAULT '1900-01-01'; 

ALTER TABLE `punchsys_remarkrecord` ADD `tstamp` INT(20) NOT NULL AFTER `apvdate`;

ALTER TABLE `punchsys_staff` CHANGE `pfx` `pfx` VARCHAR(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL; 
ALTER TABLE `punchsys_staff` CHANGE `nation` `nation` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL;
ALTER TABLE `punchsys_staff` CHANGE `fprint01` `fprint01` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL, CHANGE `fprint02` `fprint02` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL, CHANGE `fprint03` `fprint03` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL;

RENAME TABLE `xoops_pc_timetable` TO `punchsys_timetable`; 

RENAME TABLE `xoops_pc_holiday` TO `punchsys_holiday`; 

RENAME TABLE `xoops_pc_remarkevent` TO `punchsys_remarkevent`; 