/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BASE_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BD_VALIDATORCFG', 'T_BD_VALIDATORCFG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BD_VALIDATORCFG' AND KSQL_INDNAME = 'IDX_T_BD_VALIDATORCFG_VALIDATE') CREATE INDEX IDX_T_BD_VALIDATORCFG_VALIDATE ON T_BD_VALIDATORCFG ( FVALIDATEBILL );


 EXEC P_ALTERPK 'PK_T_BD_VALIDATORCFG_L', 'T_BD_VALIDATORCFG_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BD_VALIDATORCFG_L' AND KSQL_INDNAME = 'IDX_T_BD_VALIDATORCFG_L_FID') CREATE INDEX IDX_T_BD_VALIDATORCFG_L_FID ON T_BD_VALIDATORCFG_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BD_VALIDATORCFGENTRY', 'T_BD_VALIDATORCFGENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BD_VALIDATORCFGENTRY' AND KSQL_INDNAME = 'IDX_T_BD_VALIDATORCFGENTRY') CREATE INDEX IDX_T_BD_VALIDATORCFGENTRY ON T_BD_VALIDATORCFGENTRY ( FID );


 EXEC P_ALTERPK 'PK_T_BD_VALIDATORCFGENTRY_L', 'T_BD_VALIDATORCFGENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BD_VALIDATORCFGENTRY_L' AND KSQL_INDNAME = 'IDX_T_BD_VALIDATORCFGENTRY_L_F') CREATE INDEX IDX_T_BD_VALIDATORCFGENTRY_L_F ON T_BD_VALIDATORCFGENTRY_L ( FENTRYID ,FLOCALEID );



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