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


EXEC p_AlterPK 'PK_PERM_USERROLE', 'T_PERM_USERROLE', 'FID', '0';
EXEC p_DropIdx 'IDX_PERM_ROLEDIMFID', 'T_PERM_USERROLE';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PERM_UR') CREATE UNIQUE  CLUSTERED INDEX IDX_PERM_UR ON T_PERM_USERROLE ( FROLEID ,FDIMTYPE ,FISINCLUDESUBORG ,FUSERID ,FORGID );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_PERM_00000021') CREATE  CLUSTERED INDEX IX_PERM_00000021 ON T_PERM_USERROLE ( FUSERID ,FORGID ,FROLEID );



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