/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MAL_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MAL_PROD' AND KSQL_COL_NAME ='FSTANDARDID') 
 ALTER TABLE T_MAL_PROD ADD (FSTANDARDID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MAL_COMPENTRY' AND KSQL_COL_NAME ='FSOURCE') 
 ALTER TABLE T_MAL_COMPENTRY ADD (FSOURCE VARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MAL_COMPCONFIG' AND KSQL_COL_NAME IN ('FGOODSCLASS')) 
 ALTER TABLE T_MAL_COMPCONFIG ADD (FGOODSCLASS CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MAL_COMPCONFIG' AND KSQL_COL_NAME IN ('FISONHOMEPAGE')) 
 ALTER TABLE T_MAL_COMPCONFIG ADD (FISONHOMEPAGE CHAR(1) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MAL_COMPSUBENTRY' AND KSQL_COL_NAME IN ('FSOURCE')) 
 ALTER TABLE T_MAL_COMPSUBENTRY ADD (FSOURCE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MAL_COMPENTRY' AND KSQL_COL_NAME IN ('FTITLE')) 
 ALTER TABLE T_MAL_COMPENTRY ADD (FTITLE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MAL_COMPENTRY' AND KSQL_COL_NAME IN ('FINFORMATION')) 
 ALTER TABLE T_MAL_COMPENTRY ADD (FINFORMATION VARCHAR(50) DEFAULT ' ' NOT NULL );
/**End C:\PDM_UPGRADE\PDM1\MAL_table.sql **/

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MAL_table.sql **/
