-- 项目参数新增8个字段：事务类型、单据类型、业务类型	
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTPARAM' AND KSQL_COL_NAME ='FPROJPRODTXNID') 
ALTER TABLE T_BD_PROJECTPARAM ADD (FPROJPRODTXNID BIGINT DEFAULT 0 NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTPARAM' AND KSQL_COL_NAME ='FGENPRODTXNID') 
ALTER TABLE T_BD_PROJECTPARAM ADD (FGENPRODTXNID BIGINT DEFAULT 0 NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTPARAM' AND KSQL_COL_NAME ='FPROJOUTTXNID') 
ALTER TABLE T_BD_PROJECTPARAM ADD (FPROJOUTTXNID BIGINT DEFAULT 0 NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTPARAM' AND KSQL_COL_NAME ='FGENOUTTXNID') 
ALTER TABLE T_BD_PROJECTPARAM ADD (FGENOUTTXNID BIGINT DEFAULT 0 NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTPARAM' AND KSQL_COL_NAME ='FPROJPURDOCID') 
ALTER TABLE T_BD_PROJECTPARAM ADD (FPROJPURDOCID BIGINT DEFAULT 0 NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTPARAM' AND KSQL_COL_NAME ='FPROJPURBUSID') 
ALTER TABLE T_BD_PROJECTPARAM ADD (FPROJPURBUSID BIGINT DEFAULT 0 NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTPARAM' AND KSQL_COL_NAME ='FGENPURDOCID') 
ALTER TABLE T_BD_PROJECTPARAM ADD (FGENPURDOCID BIGINT DEFAULT 0 NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_PROJECTPARAM' AND KSQL_COL_NAME ='FGENPURBUSID') 
ALTER TABLE T_BD_PROJECTPARAM ADD (FGENPURBUSID BIGINT DEFAULT 0 NOT NULL);