/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BASE_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BD_CUSTOMERRECORD_L', 'T_BD_CUSTOMERRECORD_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_CUSTOMERRECORD_LANG') CREATE INDEX IDX_BD_CUSTOMERRECORD_LANG ON T_BD_CUSTOMERRECORD_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BD_SUPPLIERRECORD_L', 'T_BD_SUPPLIERRECORD_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_SUPPLIERRECORD_LANG') CREATE INDEX IDX_BD_SUPPLIERRECORD_LANG ON T_BD_SUPPLIERRECORD_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BD_CUSTOMERRECORD', 'T_BD_CUSTOMERRECORD', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_CUSTOMERRECORD_ID') CREATE INDEX IDX_BD_CUSTOMERRECORD_ID ON T_BD_CUSTOMERRECORD ( FID );


 EXEC P_ALTERPK 'PK_T_BD_SUPPLIERRECORD', 'T_BD_SUPPLIERRECORD', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_SUPPLIERRECORD_ID') CREATE INDEX IDX_BD_SUPPLIERRECORD_ID ON T_BD_SUPPLIERRECORD ( FID );



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