/**BEGIN E:\NEXTERP_PDM\PDM_UPGRADE\PDMS\BRANCH_LASTEST\PDM\POM_CONSTRAINT.SQL **/

  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FPLANSCOPE')
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FPLANSCOPE BIGINT DEFAULT 0 NOT NULL);
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FSUPPLYRULE')
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FSUPPLYRULE NVARCHAR(30) DEFAULT ' ' NOT NULL);
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDERENTRY' AND KSQL_COL_NAME ='FSUPPLYRULE')
 ALTER TABLE T_POM_XMFTORDERENTRY ADD (FSUPPLYRULE NVARCHAR(30) DEFAULT ' ' NOT NULL);
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDERENTRY' AND KSQL_COL_NAME ='FPLANSCOPE')
 ALTER TABLE T_POM_XMFTORDERENTRY ADD (FPLANSCOPE BIGINT DEFAULT 0 NOT NULL);
 
/**END E:\NEXTERP_PDM\PDM_UPGRADE\PDMS\BRANCH_LASTEST\PDM\POM_CONSTRAINT.SQL **/