/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_PERM_USRGRP_INH', 'T_PERM_USRGRP_INH', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PERM_USRGRP_INH') CREATE INDEX IDX_PERM_USRGRP_INH ON T_PERM_USRGRP_INH ( FPARENTID );


 EXEC P_ALTERPK 'PK_T_PERM_USRGRPBIZROLE', 'T_PERM_USRGRPBIZROLE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PERM_USRGRPBR') CREATE INDEX IDX_PERM_USRGRPBR ON T_PERM_USRGRPBIZROLE ( FUSRGRPID );


 EXEC P_ALTERPK 'PK_T_PERM_USRGRPROLE', 'T_PERM_USRGRPROLE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PERM_USRGRPROLE') CREATE INDEX IDX_PERM_USRGRPROLE ON T_PERM_USRGRPROLE ( FUSRGRPID );


 EXEC P_ALTERPK 'PK_T_PERM_USRGRPROLE_DIMOBJ', 'T_PERM_USRGRPROLE_DIMOBJ', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_USRGRPROLE_DIMOBJ') CREATE INDEX IDX_USRGRPROLE_DIMOBJ ON T_PERM_USRGRPROLE_DIMOBJ ( FUSR_USRGRP_RELID );



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