

 --组件清单ID
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_DISTPLANSUGGEST' AND KSQL_COL_NAME ='FMFTSTOCKID')
  ALTER TABLE T_POM_DISTPLANSUGGEST ADD (FMFTSTOCKID NVARCHAR(80) DEFAULT ' ' NOT NULL );
 --组件清单分录ID
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_DISTPLANSUGGEST' AND KSQL_COL_NAME ='FMFTSTOCKENTRYID')
  ALTER TABLE T_POM_DISTPLANSUGGEST ADD (FMFTSTOCKENTRYID NVARCHAR(80) DEFAULT ' ' NOT NULL );


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


--供应相关字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_DISTPLANSUGGEST' AND KSQL_COL_NAME ='FREMARK')
 ALTER TABLE T_POM_DISTPLANSUGGEST ADD (FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL);

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_DISTPLANSUGGEST' AND KSQL_COL_NAME ='FSUPPLYBILL')
 ALTER TABLE T_POM_DISTPLANSUGGEST ADD (FSUPPLYBILL NVARCHAR(36) DEFAULT ' ' NOT NULL);

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_DISTPLANSUGGEST' AND KSQL_COL_NAME ='FSUPPLYBILLNO')
 ALTER TABLE T_POM_DISTPLANSUGGEST ADD (FSUPPLYBILLNO NVARCHAR(80) DEFAULT ' ' NOT NULL);

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_DISTPLANSUGGEST' AND KSQL_COL_NAME ='FSUPPLYBILLID')
 ALTER TABLE T_POM_DISTPLANSUGGEST ADD (FSUPPLYBILLID NVARCHAR(50) DEFAULT ' ' NOT NULL);

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_DISTPLANSUGGEST' AND KSQL_COL_NAME ='FSUPPLYBILLENTRYID')
 ALTER TABLE T_POM_DISTPLANSUGGEST ADD (FSUPPLYBILLENTRYID NVARCHAR(50) DEFAULT ' ' NOT NULL);

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_DISTPLANSUGGEST' AND KSQL_COL_NAME ='FSUPPLYBILLENTRYSEQ')
 ALTER TABLE T_POM_DISTPLANSUGGEST ADD (FSUPPLYBILLENTRYSEQ INT DEFAULT 0 NOT NULL);

