/**Begin D:\PDM_UPGRADE\PDM1\kd_1.5.112_tbo_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_TBO_PLCONFIG', 'T_TBO_PLCONFIG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_TBO_PLCONFIG_ENTRYS', 'T_TBO_PLCONFIG_ENTRYS', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_TBO_PLCONFIG_L', 'T_TBO_PLCONFIG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_TBO_PLCONFIG_ORG', 'T_TBO_PLCONFIG_ORG', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_TBO_PLCONFIGITEM', 'T_TBO_PLCONFIGITEM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_TBO_PLCONFIGITEM_L', 'T_TBO_PLCONFIGITEM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_TBO_PLINFO', 'T_TBO_PLINFO', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TBO_PLINFO') CREATE INDEX IDX_TBO_PLINFO ON T_TBO_PLINFO ( FBILLNO );


 EXEC P_ALTERPK 'PK_T_TBO_PLINFO_ENTRYS', 'T_TBO_PLINFO_ENTRYS', 'FENTRYID', '1';

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



/**End D:\PDM_UPGRADE\PDM1\kd_1.5.112_tbo_constraint.sql **/
