/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FMM_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_DEFECTTYPE_L' AND KSQL_COL_NAME ='FDESCRIPTION') 
ALTER TABLE T_FMM_DEFECTTYPE_L ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_DEFECTSITE_L' AND KSQL_COL_NAME ='FDESCRIPTION') 
ALTER TABLE T_FMM_DEFECTSITE_L ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_DEFECTREASON_L' AND KSQL_COL_NAME ='FDESCRIPTION') 
ALTER TABLE T_FMM_DEFECTREASON_L ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FMM_DISPOSALMEASURES_L' AND KSQL_COL_NAME ='FDESCRIPTION') 
ALTER TABLE T_FMM_DISPOSALMEASURES_L ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL);

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