ALTER IGNORE TABLE psd_supplier add primary key (id)
ALTER IGNORE TABLE psd_supplier MODIFY id int NOT NULL
ALTER IGNORE TABLE mantenance_status add primary key (id)
ALTER IGNORE TABLE mantenance_status MODIFY id varchar(2) NOT NULL
ALTER IGNORE TABLE mantenance_service add primary key (mt_no)
ALTER IGNORE TABLE mantenance_service MODIFY mt_no varchar(12) NOT NULL
ALTER IGNORE TABLE dcplan_result add primary key (code)
ALTER IGNORE TABLE dcplan_result MODIFY code varchar(2) NOT NULL
ALTER IGNORE TABLE dcplan_problem add primary key (code)
ALTER IGNORE TABLE dcplan_problem MODIFY code varchar(2) NOT NULL
ALTER IGNORE TABLE dcplan add primary key (hhc)
ALTER IGNORE TABLE dcplan MODIFY hhc varchar(5) NOT NULL
ALTER TABLE psd_supplier ADD `service` varchar(250) NULL
ALTER TABLE psd_supplier ADD `telephone` varchar(50) NULL
ALTER TABLE psd_supplier ADD `address` varchar(250) NULL
ALTER TABLE psd_supplier ADD `name` varchar(250) NULL
ALTER TABLE psd_product MODIFY COLUMN `ptype` varchar(2)
ALTER TABLE pcu_family_folder_print ADD `print_sort` int NULL
ALTER TABLE pcu_family_folder_print ADD `tage` int NULL
ALTER TABLE pcu_family_folder_print ADD `fage` int NULL
ALTER TABLE pcu_family_folder_print ADD `printyn` int NULL
ALTER TABLE pcu_family_folder_print ADD `forsex` varchar(20) NULL
ALTER TABLE pcu_family_folder_print ADD `report_name` varchar(80) NULL
ALTER TABLE mantenance_status ADD `name` varchar(45) NULL
ALTER TABLE mantenance_service ADD `finish_time` time NULL
ALTER TABLE mantenance_service ADD `finish_date` date NULL
ALTER TABLE mantenance_service ADD `repair_remmark` text NULL
ALTER TABLE mantenance_service ADD `repair_detail` text NULL
ALTER TABLE mantenance_service ADD `repair_by` varchar(25) NULL
ALTER TABLE mantenance_service ADD `todep` int NULL
ALTER TABLE mantenance_service ADD `saveby` varchar(25) NULL
ALTER TABLE mantenance_service ADD `status` varchar(2) NULL
ALTER TABLE mantenance_service ADD `mt_station_id` varchar(2) NULL
ALTER TABLE mantenance_service ADD `user_id` varchar(25) NULL
ALTER TABLE mantenance_service ADD `piority` int NULL
ALTER TABLE mantenance_service ADD `prediag` text NULL
ALTER TABLE mantenance_service ADD `problem` text NULL
ALTER TABLE mantenance_service ADD `psd_group_id` varchar(2) NULL
ALTER TABLE mantenance_service ADD `item_name` varchar(45) NULL
ALTER TABLE mantenance_service ADD `from_dep` int NULL
ALTER TABLE mantenance_service ADD `mt_time` time NULL
ALTER TABLE mantenance_service ADD `mt_date` date NULL
ALTER TABLE dcplan_result ADD `name` varchar(45) NULL
ALTER TABLE dcplan_problem ADD `name` varchar(45) NULL
ALTER TABLE dcplan ADD `result_other` varchar(45) NULL
ALTER TABLE dcplan ADD `result_after_dx` varchar(2) NULL
ALTER TABLE dcplan ADD `teldate` date NULL
ALTER TABLE dcplan ADD `telhosp` varchar(30) NULL
ALTER TABLE dcplan ADD `tohosp` varchar(5) NULL
ALTER TABLE dcplan ADD `prob_other` varchar(45) NULL
ALTER TABLE dcplan ADD `prob_continue` varchar(2) NULL
ALTER TABLE dcplan ADD `contact_phone` varchar(30) NULL
ALTER TABLE dcplan ADD `disc` date NULL
ALTER TABLE dcplan ADD `dx` varchar(45) NULL
ALTER TABLE dcplan ADD `ward` varchar(30) NULL
ALTER TABLE dcplan ADD `an` varchar(9) NULL
ALTER TABLE dcplan ADD `hn` varchar(
NULL
ALTER TABLE dcplan ADD `hhcrefer` varchar(6) NULL
ALTER TABLE book_tooffice ADD `office_no` varchar(2) NULL
ALTER TABLE book_tooffice ADD `rcvdatetime` datetime NULL
ALTER TABLE book_tooffice ADD `savedatetime` datetime NULL
CREATE TABLE psd_supplier ( `id` int NOT NULL )
CREATE TABLE pcu_family_folder_print ( `ffgroup` varchar(20) NULL )
CREATE TABLE mantenance_status ( `id` varchar(2) NOT NULL )
CREATE TABLE mantenance_service ( `mt_no` varchar(12) NOT NULL )
CREATE TABLE dcplan_result ( `code` varchar(2) NOT NULL )
CREATE TABLE dcplan_problem ( `code` varchar(2) NOT NULL )
CREATE TABLE dcplan ( `hhc` varchar(5) NOT NULL )
CREATE TABLE book_tooffice ( `idreceive` varchar(4) NULL )
delete from hosxp_ddl_index
delete from hosxp_ddl_field
delete from hosxpmini_ddl_table
CREATE TABLE if not exists `hosxp_ddl_index` ( `table_name` varchar(150) NOT NULL default "", `index_name` varchar(150) NOT NULL default "", `field_number` int(11) default NULL, `field_name` varchar(150) NOT NULL default "", `index_unique` char(1) default NULL, `index_seq` int(11) default NULL, PRIMARY KEY (`table_name`,`index_name`,`field_name`), KEY `index_name` (`index_name`), KEY `table_name` (`table_name`) )
DROP TABLE if exists hosxp_ddl_index
CREATE TABLE if not exists `hosxpmini_ddl_table` ( `table_name` varchar(150) NOT NULL )
DROP TABLE if exists hosxpmini_ddl_table
Update hosxpmini_ddl_table data ...
CREATE TABLE if not exists `hosxp_ddl_field` ( `table_name` varchar(150) NOT NULL default "", `field_name` varchar(150) NOT NULL default "", `field_type_mysql` varchar(100) default NULL, `field_type_postgresql` varchar(100) default NULL, `field_type_mssql` varchar(100) default NULL, `field_type_interbase` varchar(100) default NULL, `field_width` int(11) default NULL, `field_null` varchar(10) default NULL, `field_number` int(11) default NULL, `field_primary` char(1) default NULL, `field_type_oracle` varchar(150) default NULL, `field_type_native` varchar(100) default NULL, `field_precision` int(11) default NULL, `field_precision_text` varchar(100) default NULL, PRIMARY KEY (`table_name`,`field_name`), KEY `field_name` (`field_name`), KEY `table_name` (`table_name`) )
DROP TABLE if exists hosxp_ddl_field
Update hosxp_dll_field data ...
Change pk on table dcplan --> hhc
Change pk on table dcplan_problem --> code
Change pk on table dcplan_result --> code
Change pk on table mantenance_service --> mt_no
Change pk on table mantenance_status --> id
Change pk on table psd_supplier --> id
Import table : book_codeoffice
Import table : book_file
Import table : book_rcv
Import table : book_suboffice
Import table : book_tooffice
Import table : dcplan
Import table : dcplan_problem
Import table : dcplan_result
Import table : mantenance_service
Import table : mantenance_status
Import table : pcu_family_folder_print
Import table : psd_budget
Import table : psd_man
Import table : psd_order
Import table : psd_order_detail
Import table : psd_ordertype
Import table : psd_pgroup
Import table : psd_product
Import table : psd_supplier