/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PDM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PDM_ROUTEOPERATION' AND KSQL_COL_NAME ='FISCONFIGRULE') 
 ALTER TABLE T_PDM_ROUTEOPERATION ADD (FISCONFIGRULE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PDM_ROUTE' AND KSQL_COL_NAME ='FCONFIGCODE') 
 ALTER TABLE T_PDM_ROUTE ADD (FCONFIGCODE BIGINT DEFAULT 0 NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FMM_ROUTECONFRULE') 
 CREATE TABLE T_FMM_ROUTECONFRULE (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCONFIGRULEID BIGINT DEFAULT 0 NOT NULL,
FCONFIGRULENO INT DEFAULT 0 NOT NULL
);
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PDM_table.sql **/
