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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_SCHEMESCENE_MODEL') CREATE INDEX IDX_BCM_SCHEMESCENE_MODEL ON T_BCM_SCHEMESCENE ( FMODEL );


 EXEC P_ALTERPK 'PK_T_BCM_SCHEMESCENEENTRY', 'T_BCM_SCHEMESCENEENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_SCHEMESCENEENTRY') CREATE INDEX IDX_BCM_SCHEMESCENEENTRY ON T_BCM_SCHEMESCENEENTRY ( FID ,FSCHEME );


 EXEC P_ALTERPK 'PK_T_BCM_EXPORTFILENAMERULE', 'T_BCM_EXPORTFILENAMERULE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_EXPORTFILERULE') CREATE INDEX IDX_BCM_EXPORTFILERULE ON T_BCM_EXPORTFILENAMERULE ( FUSERID );


 EXEC P_ALTERPK 'PK_T_BCM_EXPORTFILENAMERULE_L', 'T_BCM_EXPORTFILENAMERULE_L', 'FPKID', '1';

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



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