/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_STRUCTOFENT_S', 'T_BCM_STRUCTOFENT_S', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_STRUCTOFENT_S') CREATE INDEX IDX_BCM_STRUCTOFENT_S ON T_BCM_STRUCTOFENT_S ( FISOUTERORG );


 EXEC P_ALTERPK 'PK_T_BCM_RDATA_CUSTSET', 'T_BCM_RDATA_CUSTSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_RDATA_CUSTSET_MODEL') CREATE INDEX IDX_BCM_RDATA_CUSTSET_MODEL ON T_BCM_RDATA_CUSTSET ( FMODELID );


 EXEC P_ALTERPK 'PK_T_BCM_RDATA_DETAIL', 'T_BCM_RDATA_DETAIL', 'FENTRYID', '1';

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



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