IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FSALEORDERDATE') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FSALEORDERDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FMATERIALGROUP') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FMATERIALGROUP BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FBILLTYPE') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FBILLTYPE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FSOURCEBILLENTRYNO') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FSOURCEBILLENTRYNO NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FMACHINEMODEL') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FMACHINEMODEL NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FPLSQTY') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FPLSQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FASSOCIATIONNUMBER') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FASSOCIATIONNUMBER VARCHAR(10) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FGEARBOX') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FGEARBOX NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FSOURCEENTRYID') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FSOURCEENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FSOURCEBILLID') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FSOURCEBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FCONFIGURE') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FCONFIGURE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FPRIORITY') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FPRIORITY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FTEXTFIELD1') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FTEXTFIELD1 NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FMACHINEFACOTY') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FMACHINEFACOTY NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FRESTYPE') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FRESTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FSELECTCONF') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FSELECTCONF BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FDRIVEROOM') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FDRIVEROOM NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FREQUIREDATE') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FREQUIREDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FDATASOURCEID') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FDATASOURCEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FSELECTPROGRAM') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FSELECTPROGRAM NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER' AND KSQL_COL_NAME ='FTRACKNUMBER') 
 ALTER TABLE T_MRP_PROSCHEDULE_ORDER ADD (FTRACKNUMBER BIGINT DEFAULT 0 NOT NULL );
