/**Begin D:\PDM\PDM_UPGRADE\pdm1\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_PERMISSIONCLASS', 'T_BCM_PERMISSIONCLASS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_PERMISSIONCLASS_L', 'T_BCM_PERMISSIONCLASS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_PERMCLASS_ENTITY', 'T_BCM_PERMCLASS_ENTITY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_PERMCLASS_ENTITY_QUERY') CREATE INDEX IDX_BCM_PERMCLASS_ENTITY_QUERY ON T_BCM_PERMCLASS_ENTITY ( FPERMCLASSID ,FENTITYID ,FENTITYNAME ,FMODELID );



/**End D:\PDM\PDM_UPGRADE\pdm1\BCM_constraint.sql **/
