/**Begin D:\PDM_UPGRADE\PDM1\BOS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BD_AUTOASSIGN', 'T_BD_AUTOASSIGN', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_AUTOASSIGN_NUMBER') CREATE INDEX IDX_T_BD_AUTOASSIGN_NUMBER ON T_BD_AUTOASSIGN ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_BD_AUTOASSIGN_L', 'T_BD_AUTOASSIGN_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BD_AUTOASSIGN_ASSIGNORG', 'T_BD_AUTOASSIGN_ASSIGNORG', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BD_AUTOASSIGN_USEORG', 'T_BD_AUTOASSIGN_USEORG', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_AUTOASSIGN_USEORG_ID') CREATE INDEX IDX_T_BD_AUTOASSIGN_USEORG_ID ON T_BD_AUTOASSIGN_USEORG ( FENTRYID );

 EXEC P_ALTERPK 'PK_T_BD_FILTERCONDITION', 'T_BD_FILTERCONDITION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_FILTERCOND_ENTITY') CREATE INDEX IDX_T_BD_FILTERCOND_ENTITY ON T_BD_FILTERCONDITION ( FENTITYID );


/**End D:\PDM_UPGRADE\PDM1\BOS_constraint.sql **/
