/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BAS_UNITTESTDETAIL_TAG', 'T_BAS_UNITTESTDETAIL_TAG', 'FPKID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BAS_UT_TAGID') CREATE INDEX IDX_BAS_UT_TAGID ON T_BAS_UNITTESTDETAIL_TAG ( FBASEDATAID );


 EXEC P_ALTERPK 'PK_T_UT_APP_TAG_L', 'T_UT_APP_TAG_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_UT_APP_TAG_L_0') CREATE INDEX IDX_UT_APP_TAG_L_0 ON T_UT_APP_TAG_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_UT_GROUP_TYPE_CASE', 'T_UT_GROUP_TYPE_CASE', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_UT_GROUP_TYPE_CASEID') CREATE INDEX IDX_UT_GROUP_TYPE_CASEID ON T_UT_GROUP_TYPE_CASE ( FKCASEID );



 EXEC P_ALTERPK 'PK_T_UT_APP_TAG', 'T_UT_APP_TAG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_UT_APP_TAG_NUMBER') CREATE UNIQUE INDEX IDX_UT_APP_TAG_NUMBER ON T_UT_APP_TAG ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_UT_GROUP_TYPE', 'T_UT_GROUP_TYPE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BAS_GROUP_TYPE_NUMBER') CREATE UNIQUE INDEX IDX_BAS_GROUP_TYPE_NUMBER ON T_UT_GROUP_TYPE ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_UT_GROUP_TYPE_L', 'T_UT_GROUP_TYPE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'T_UT_GROUP_TYPE_L_FID') CREATE INDEX T_UT_GROUP_TYPE_L_FID ON T_UT_GROUP_TYPE_L ( FID ,FLOCALEID );




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