/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_constraint.sql **/
EXEC p_DropIdx 'IDX_T_ORG_STRUCTURE_H_ORG', 'T_ORG_STRUCTURE_H';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ORG_STRUCT_H_ORGVIEWLNUM') CREATE INDEX IDX_ORG_STRUCT_H_ORGVIEWLNUM ON T_ORG_STRUCTURE_H ( FORGID ,FVIEWID ,FLONGNUMBER );

EXEC p_DropIdx 'IDX_T_ORG_ORG_H_FORGID', 'T_ORG_ORG_H';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_ORG_ORG_H_ORGNUM') CREATE INDEX IDX_T_ORG_ORG_H_ORGNUM ON T_ORG_ORG_H ( FORGID ,FNUMBER );

EXEC p_DropIdx 'IDX_T_SEC_USER_H_PHONEMAIL', 'T_SEC_USER_H';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SEC_USER_H_UIDNUMPHONEMAIL') CREATE INDEX IDX_SEC_USER_H_UIDNUMPHONEMAIL ON T_SEC_USER_H ( FUSERID ,FNUMBER ,FPHONE ,FEMAIL );

EXEC p_DropIdx 'IDX_T_YZJ_ORG_FORGID', 'T_YZJ_ORG';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_YZJ_ORG_TASKBTORG') CREATE INDEX IDX_T_YZJ_ORG_TASKBTORG ON T_YZJ_ORG ( FTASKID ,FBACKUPTYPE ,FORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_YZJ_USER_TASKBTUSER') CREATE INDEX IDX_YZJ_USER_TASKBTUSER ON T_YZJ_USER ( FTASKID ,FBACKUPTYPE ,FUSERID );

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