/* 差旅主表 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEBILL' AND KSQL_COL_NAME ='FABOVEQUOTAEMP')
ALTER TABLE T_ER_REIMBURSEBILL ADD (FABOVEQUOTAEMP VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEBILL' AND KSQL_COL_NAME ='FABOVEQUOTADEPT')
ALTER TABLE T_ER_REIMBURSEBILL ADD (FABOVEQUOTADEPT VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEBILL' AND KSQL_COL_NAME ='FHEADHAPPENDATE')
ALTER TABLE T_ER_REIMBURSEBILL ADD (FHEADHAPPENDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEBILL' AND KSQL_COL_NAME ='FISMULTIEXPITEM')
ALTER TABLE T_ER_REIMBURSEBILL ADD (FISMULTIEXPITEM CHAR(1) DEFAULT '0' NOT NULL );

/*行程信息*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSETRIPENTRY' AND KSQL_COL_NAME ='FTRIPHAPPENDATE')
ALTER TABLE T_ER_REIMBURSETRIPENTRY ADD (FTRIPHAPPENDATE DATETIME );

/* 差旅明细 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEENTRY' AND KSQL_COL_NAME ='FTRAVELEXPENSEITEM')
ALTER TABLE T_ER_REIMBURSEENTRY ADD (FTRAVELEXPENSEITEM BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEENTRY' AND KSQL_COL_NAME ='FTRAVELHAPPENDATE')
ALTER TABLE T_ER_REIMBURSEENTRY ADD (FTRAVELHAPPENDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEENTRY' AND KSQL_COL_NAME ='FTRAVELCOSTDEPT')
ALTER TABLE T_ER_REIMBURSEENTRY ADD (FTRAVELCOSTDEPT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEENTRY' AND KSQL_COL_NAME ='FTRAVELCOSTCOMPANY')
ALTER TABLE T_ER_REIMBURSEENTRY ADD (FTRAVELCOSTCOMPANY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEENTRY' AND KSQL_COL_NAME ='FTRAVELQUOTACTLDEPT')
ALTER TABLE T_ER_REIMBURSEENTRY ADD (FTRAVELQUOTACTLDEPT BIGINT DEFAULT 0 NOT NULL );