ALTER TABLE village_survey_item ADD `unit_name` varchar(50) NULL
ALTER TABLE village_survey_item ADD `item_group` int NULL
ALTER TABLE village_survey_item ADD `count_sql` varchar(250) NULL
ALTER TABLE village_survey_item ADD `village_survey_item_name` varchar(200) NOT NULL
ALTER TABLE village_survey_detail ADD `survey_value` int NOT NULL
ALTER TABLE village_survey_detail ADD `village_survey_item_id` int NOT NULL
ALTER TABLE village_survey_detail ADD `village_id` int NOT NULL
ALTER TABLE village_student ADD `village_school_class_id` int NOT NULL
ALTER TABLE village_student ADD `person_id` int NOT NULL
ALTER TABLE village_student ADD `village_school_id` int NOT NULL
ALTER TABLE village_school_class ADD `village_school_class_name` varchar(150) NOT NULL
ALTER TABLE village ADD `village_code` varchar(10) NULL
ALTER TABLE village ADD `hos_guid` varchar(38) NULL
ALTER TABLE person ADD `drug_allergy` varchar(150) NULL
ALTER TABLE person ADD `family_position_id` int NULL
ALTER TABLE person ADD `home_position_id` int NULL
ALTER TABLE person ADD `income_per_year` int NULL
ALTER TABLE person ADD `hos_guid` varchar(38) NULL
ALTER TABLE house_survey_yesno ADD `name` varchar(100) NULL
ALTER TABLE house_survey_water ADD `name` varchar(100) NOT NULL
ALTER TABLE house_survey_toilet ADD `name` varchar(150) NULL
ALTER TABLE house_survey_summary ADD `house_item_value_text` varchar(200) NULL
ALTER TABLE house_survey_summary ADD `house_item_value` varchar(25) NULL
ALTER TABLE house_survey_summary ADD `house_survey_item_id` int NOT NULL
ALTER TABLE house_survey_summary ADD `house_id` int NOT NULL
ALTER TABLE house_survey_item ADD `lookup_key_field` varchar(30) NULL
ALTER TABLE house_survey_item ADD `survey_group` varchar(50) NULL
ALTER TABLE house_survey_item ADD `lookup_field` varchar(30) NULL
ALTER TABLE house_survey_item ADD `lookup_table` varchar(30) NULL
ALTER TABLE house_survey_item ADD `item_data_type` varchar(15) NOT NULL
ALTER TABLE house_survey_item ADD `house_survey_item_name` varchar(250) NOT NULL
ALTER TABLE house_survey_health ADD `name` varchar(150) NULL
ALTER TABLE house_survey_garbage ADD `name` varchar(150) NULL
ALTER TABLE house_survey_detail ADD `hos_guid` varchar(38) NULL
ALTER TABLE house_survey_detail ADD `house_item_value_text` varchar(200) NULL
ALTER TABLE house_survey_detail ADD `house_item_value` varchar(25) NULL
ALTER TABLE house_survey_detail ADD `house_survey_item_id` int NULL
ALTER TABLE house_survey_detail ADD `house_survey_id` int NOT NULL
ALTER TABLE house_survey ADD `survey_detail` text NULL
ALTER TABLE house_survey ADD `survey_date` date NULL
ALTER TABLE house_survey ADD `house_id` int NOT NULL
ALTER TABLE house ADD `location_area_id` int NULL
ALTER TABLE house ADD `hos_guid` varchar(38) NULL
CREATE TABLE village_survey_item ( `village_survey_item_id` int NOT NULL )
CREATE TABLE village_survey_detail ( `village_survey_detail_id` int NOT NULL )
CREATE TABLE village_student ( `village_student_id` int NOT NULL )
CREATE TABLE village_school_class ( `village_school_clas_id` int NOT NULL )
CREATE TABLE house_survey_yesno ( `house_survey_yesno_id` int NOT NULL )
CREATE TABLE house_survey_water ( `house_survey_water_id` int NOT NULL )
CREATE TABLE house_survey_toilet ( `house_survey_toilet_id` int NOT NULL )
CREATE TABLE house_survey_summary ( `house_survey_summary_id` int NOT NULL )
CREATE TABLE house_survey_item ( `house_survey_item_id` int NOT NULL )
CREATE TABLE house_survey_health ( `house_survey_health_id` int NOT NULL )
CREATE TABLE house_survey_garbage ( `house_survey_garbage_id` int NOT NULL )
CREATE TABLE house_survey_detail ( `house_survey_detail_id` int NOT NULL )
CREATE TABLE house_survey ( `house_survey_id` int NOT NULL )
Checking structure phase 1
Table opdscreen has hos_guid
Table patient has hos_guid
Table ovst has hos_guid
Table opitemrece has hos_guid
Update hosxp_dll_field data ...
Upgrade MySQL Start
ไม่ได้ครับเพราะว่ามันจะติด hos_guid
เดี่ยวผมมาต่อใหม่