อ.อ๊อด sql upgrade จาก version ไหน ไป version ไหนครับ ไม่เห็นมี checkup เลยครับ สงสัยลองหลายรุ่นจนงงงงงง
คำสั่ง upgrade structure จาก 51.11.6 --> 51.11.11 (ข้าม 51.11.10)
ALTER TABLE xray_report MODIFY COLUMN `request_depcode` varchar(3)
ALTER TABLE web_conf MODIFY COLUMN `header` varchar(1)
ALTER TABLE village_student_vaccine MODIFY COLUMN `provider_hospcode` char(5)
ALTER TABLE village MODIFY COLUMN `address_id` char(6)
ALTER TABLE tempmanoi_xp2 MODIFY COLUMN `person_id` char(13)
ALTER TABLE tempmanoi_xp2 MODIFY COLUMN `hn` char(7)
ALTER TABLE surveil_member MODIFY COLUMN `hospcode` char(5)
ALTER TABLE referout MODIFY COLUMN `referout_transfer_hospcode` char(5)
ALTER TABLE person_women_service MODIFY COLUMN `provider_hospcode` char(5)
ALTER TABLE person_wbc_service MODIFY COLUMN `provider_hospcode` char(5)
ALTER TABLE person_labour MODIFY COLUMN `thyroid_test_hospcode` char(5)
ALTER TABLE person_labour MODIFY COLUMN `labour_hospcode` char(5)
ALTER TABLE person_epi_vaccine MODIFY COLUMN `provider_hospcode` char(5)
ALTER TABLE person_duty MODIFY COLUMN `hcis_code` varchar(2)
ALTER TABLE person_card_request MODIFY COLUMN `hospmain` char(5)
ALTER TABLE person_card_request MODIFY COLUMN `hospcode` char(5)
ALTER TABLE person_card_request MODIFY COLUMN `cid` char(13)
ALTER TABLE person_anc_service MODIFY COLUMN `provider_hospcode` char(5)
ALTER TABLE person_anc MODIFY COLUMN `labour_hospcode` char(5)
ALTER TABLE person ADD `sps_name` varchar(100) NULL
ALTER TABLE person ADD `mother_name` varchar(100) NULL
ALTER TABLE person ADD `father_name` varchar(100) NULL
ALTER TABLE person MODIFY COLUMN `pttype_hospsub` char(5)
ALTER TABLE person MODIFY COLUMN `pttype_hospmain` char(5)
ALTER TABLE patient_search MODIFY COLUMN `ptkey` varchar(265)
ALTER TABLE patient_relation_address MODIFY COLUMN `po_code` char(5)
ALTER TABLE patient_pttype MODIFY COLUMN `hospsub` char(5)
ALTER TABLE patient_pttype MODIFY COLUMN `hospmain` char(5)
ALTER TABLE ovst_sticker MODIFY COLUMN `depcode` varchar(3)
ALTER TABLE lab_head MODIFY COLUMN `notify_depcode` varchar(3)
ALTER TABLE ipt_diagnosis_log ADD `staff` varchar(25) NULL
ALTER TABLE ipt_diagnosis_log ADD `an` varchar(9) NOT NULL
ALTER TABLE ipt_diagnosis_log ADD `ipt_diagnosis_log_time` time NULL
ALTER TABLE ipt_diagnosis_log ADD `ipt_diagnosis_log_date` date NULL
ALTER TABLE ipt_chart_location_log MODIFY COLUMN `depcode` varchar(3)
ALTER TABLE ipt_chart_location MODIFY COLUMN `depcode` varchar(3)
ALTER TABLE ipd_refer MODIFY COLUMN `refer_to_hospcode` char(5)
ALTER TABLE finger_template MODIFY COLUMN `cid` char(13)
ALTER TABLE drugitems_usage MODIFY COLUMN `icode` char(7)
ALTER TABLE drugitems_ingredient MODIFY COLUMN `icode` char(7)
ALTER TABLE drugitems MODIFY COLUMN `drugaccount` varchar(2)
ALTER TABLE doctor_dep_dlg_list MODIFY COLUMN `depcode` varchar(3)
ALTER TABLE detail_account MODIFY COLUMN `mouth` varchar(2)
ALTER TABLE checkup_visit ADD `tel` varchar(50) NULL
ALTER TABLE checkup_visit ADD `addr02` varchar(100) NULL
ALTER TABLE checkup_visit ADD `birthday` date NULL
ALTER TABLE checkup_visit ADD `add_exam` varchar(255) NULL
ALTER TABLE checkup_visit ADD `typetest` varchar(20) NULL
ALTER TABLE checkup_visit ADD `addr01` varchar(100) NULL
ALTER TABLE checkup_visit ADD `addr00` varchar(100) NULL
ALTER TABLE checkup_visit ADD `email` varchar(50) NULL
ALTER TABLE checkup_visit ADD `addr8` date NULL
ALTER TABLE checkup_visit ADD `addr7` int NULL
ALTER TABLE checkup_visit ADD `addr6` varchar(50) NULL
ALTER TABLE checkup_visit ADD `addr5` varchar(50) NULL
ALTER TABLE checkup_visit ADD `addr4` varchar(100) NULL
ALTER TABLE checkup_visit ADD `addr3` varchar(100) NULL
ALTER TABLE checkup_visit ADD `addr2` varchar(100) NULL
ALTER TABLE checkup_visit ADD `addr1` varchar(100) NULL
ALTER TABLE checkup_visit ADD `vn` varchar(13) NOT NULL
ALTER TABLE checkup_template ADD `edit_type` varchar(50) NULL
ALTER TABLE checkup_template ADD `lab_max` float NULL
ALTER TABLE checkup_template ADD `lab_min` float NULL
ALTER TABLE checkup_template ADD `default_value` varchar(30) NULL
ALTER TABLE checkup_template ADD `unit_en` varchar(20) NULL
ALTER TABLE checkup_template ADD `unit_th` varchar(20) NULL
ALTER TABLE checkup_template ADD `caption_en` varchar(90) NULL
ALTER TABLE checkup_template ADD `caption_th` varchar(90) NULL
ALTER TABLE checkup_template ADD `seq_no` int NOT NULL
ALTER TABLE checkup_template ADD `sub_group` int NOT NULL
ALTER TABLE checkup_report ADD `rpt52` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt51` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt50` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt49` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt48` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt47` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt46` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt45` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt44` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt43` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt42` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt41` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt40` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt39` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt38` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt37` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt36` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt35` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt34` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt33` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt32` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt31` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt30` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt29` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt28` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt27` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt26` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt25` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt24` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt23` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt22` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt21` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt20` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt19` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt18` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt17` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt16` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt15` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt14` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt13` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt12` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt11` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt10` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt9` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt8` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt7` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt6` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt5` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt4` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt3` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt2` varchar(255) NULL
ALTER TABLE checkup_report ADD `rpt1` varchar(255) NULL
ALTER TABLE checkup_report ADD `group_id` int NOT NULL
ALTER TABLE checkup_program ADD `chkup_prog_code` varchar(10) NULL
ALTER TABLE checkup_program ADD `chkup_prog_upd` varchar(20) NULL
ALTER TABLE checkup_program ADD `chkup_prog_usr` varchar(100) NULL
ALTER TABLE checkup_program ADD `chkup_prog_price` double(15,3) NULL
ALTER TABLE checkup_program ADD `chkup_prog_name` varchar(100) NULL
ALTER TABLE checkup_medical ADD `result` varchar(1024) NULL
ALTER TABLE checkup_medical ADD `seq_no` int NOT NULL
ALTER TABLE checkup_medical ADD `sub_group` int NOT NULL
ALTER TABLE checkup_medical ADD `group_id` int NOT NULL
ALTER TABLE checkup_lab ADD `lab_items_code` varchar(255) NULL
ALTER TABLE checkup_lab ADD `seq_no` varchar(255) NOT NULL
ALTER TABLE checkup_lab ADD `sub_group` varchar(255) NOT NULL
ALTER TABLE checkup_header ADD `chkup_prog_price` double(15,3) NULL
ALTER TABLE checkup_header ADD `chkup_prog_name` varchar(100) NULL
ALTER TABLE checkup_header ADD `chkup_visit_id` int NULL
ALTER TABLE checkup_group ADD `group_en` varchar(50) NULL
ALTER TABLE checkup_group ADD `group_th` varchar(50) NULL
ALTER TABLE checkup_group ADD `sub_group` int NOT NULL
ALTER TABLE checkup_doctor ADD `ipaddr` varchar(30) NULL
ALTER TABLE checkup_doctor ADD `lastupdate` varchar(20) NULL
ALTER TABLE checkup_doctor ADD `doctorcode` varchar(6) NOT NULL
ALTER TABLE checkup_doctor ADD `group_id` int NOT NULL
ALTER TABLE checkup_detail ADD `chkup_detail_other2` varchar(512) NULL
ALTER TABLE checkup_detail ADD `chkup_detail_group2` varchar(255) NULL
ALTER TABLE checkup_detail ADD `chkup_detail_other` varchar(512) NULL
ALTER TABLE checkup_detail ADD `chkup_detail_group` varchar(255) NULL
ALTER TABLE checkup_detail ADD `chkup_detail_code` varchar(19) NULL
ALTER TABLE checkup_detail ADD `chkup_detail_seq` int NULL
ALTER TABLE checkup_detail ADD `chkup_prog_id` int NULL
ALTER TABLE checkup_description ADD `chkup_detail_other2` varchar(512) NULL
ALTER TABLE checkup_description ADD `chkup_detail_group2` varchar(255) NULL
ALTER TABLE checkup_description ADD `chkup_detail_code` varchar(19) NOT NULL
ALTER TABLE checkup_description ADD `chkup_detail_seq` int NULL
ALTER TABLE checkup_description ADD `chkup_visit_id` int NOT NULL
ALTER TABLE blood_request_item MODIFY COLUMN `icode` char(7)
ALTER TABLE blood_detail_type MODIFY COLUMN `icode` char(7)
ALTER TABLE bed_charge_pttype MODIFY COLUMN `icode` char(7)
ALTER TABLE ar_head MODIFY COLUMN `hospsub` char(5)
ALTER TABLE ar_head MODIFY COLUMN `hospmain` char(5)
CREATE TABLE ipt_diagnosis_log ( `ipt_diagnosis_log_id` int NOT NULL )
CREATE TABLE checkup_visit ( `chkup_id` int NOT NULL )
CREATE TABLE checkup_template ( `group_id` int NOT NULL )
CREATE TABLE checkup_report ( `chkup_id` int NOT NULL )
CREATE TABLE checkup_program ( `chkup_prog_id` int NOT NULL )
CREATE TABLE checkup_medical ( `chkup_id` int NOT NULL )
CREATE TABLE checkup_lab ( `group_id` varchar(255) NOT NULL )
CREATE TABLE checkup_header ( `chkup_header_id` int NOT NULL )
CREATE TABLE checkup_group ( `group_id` int NOT NULL )
CREATE TABLE checkup_doctor ( `chkup_id` int NOT NULL )
CREATE TABLE checkup_detail ( `chkup_detail_id` int NOT NULL )
CREATE TABLE checkup_description ( `chkup_header_id` int NOT NULL )