/*费用报销单, 费用明细分录增加额度控制部门字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL' AND KSQL_COL_NAME ='FREIMCTLDEPTID') ALTER TABLE T_ER_EXPENSEDETAIL ADD (FREIMCTLDEPTID BIGINT DEFAULT 0 NOT NULL );

/*为额度控制部门字段创建索引*/
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_EXPDETAIL_REIMDEPTID') CREATE INDEX IDX_ER_EXPDETAIL_REIMDEPTID ON T_ER_EXPENSEDETAIL ( FREIMCTLDEPTID );

