--添加字段名字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FENTRYQTYNUMERATOR')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FENTRYQTYNUMERATOR DECIMAL(23,10) DEFAULT 0  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FENTRYQTYDENOMINATOR')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FENTRYQTYDENOMINATOR DECIMAL(23,10) DEFAULT 0  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FPGROUPID')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FPGROUPID VARCHAR(64) DEFAULT ' '  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FPROENTRYID')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FPROENTRYID VARCHAR(64) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_PROGRAMME' AND KSQL_COL_NAME ='FAUDITORID')
ALTER TABLE T_FMM_PROGRAMME ADD (FAUDITORID BIGINT DEFAULT 0  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_PROGRAMME' AND KSQL_COL_NAME ='FAUDITDATE')
ALTER TABLE T_FMM_PROGRAMME ADD (FAUDITDATE DATETIME);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_PROGRAMME' AND KSQL_COL_NAME ='FDISABLEUSERID')
ALTER TABLE T_FMM_PROGRAMME ADD (FDISABLEUSERID BIGINT DEFAULT 0  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_PROGRAMME' AND KSQL_COL_NAME ='FDISABLEDATE')
ALTER TABLE T_FMM_PROGRAMME ADD (FDISABLEDATE DATETIME);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_PROGRAMME' AND KSQL_COL_NAME ='FENABLEUSERID')
ALTER TABLE T_FMM_PROGRAMME ADD (FENABLEUSERID BIGINT DEFAULT 0  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_PROGRAMME' AND KSQL_COL_NAME ='FENABLEDATE')
ALTER TABLE T_FMM_PROGRAMME ADD (FENABLEDATE DATETIME);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FCREATETYPE')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FCREATETYPE VARCHAR(4) DEFAULT ' '  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FSOURCEID')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FSOURCEID VARCHAR(64) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FGROUPSTATGEDESC')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FGROUPSTATGEDESC VARCHAR(64) DEFAULT ' '  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FENTRYMATERIALATTR')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FENTRYMATERIALATTR VARCHAR(64) DEFAULT ' '  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FENTRYPROCESSNO')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FENTRYPROCESSNO BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FCGROUPID')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FCGROUPID VARCHAR(64) DEFAULT ' '  NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_ASSEMBLYENTRY' AND KSQL_COL_NAME ='FSCRAPRATE')
ALTER TABLE T_FMM_ASSEMBLYENTRY ADD (FSCRAPRATE DECIMAL(23,10) DEFAULT 0 NOT NULL);