/**Begin D:\PDMTOOLS\PDM_UPGRADE_1.3\PDM_UPGRADE\PDM1\TPO_constraint.sql **/

 EXEC P_ALTERPK 'PK_TPO_TYSBSF_BIZDEF', 'T_TPO_TYSBSF_BIZDEF', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TYSBSF_BIZDEF_TREE', 'T_TPO_TYSBSF_BIZDEF_TREE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_WHSYJSF_BIZDEF', 'T_TPO_WHSYJSF_BIZDEF', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_WHSYJSF_BIZDEF_TREE', 'T_TPO_WHSYJSF_BIZDEF_TREE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TYSBSF_BIZDEF_L', 'T_TPO_TYSBSF_BIZDEF_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TYSBSF_BIZDEF_TREE_L', 'T_TPO_TYSBSF_BIZDEF_TREE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_WHSYJSF_BIZDEF_L', 'T_TPO_WHSYJSF_BIZDEF_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_WHSYJSF_BIZDEF_TREE_L', 'T_TPO_WHSYJSF_BIZDEF_TREE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TYSBSF_BIZDEF_ENTRY', 'T_TPO_TYSBSF_BIZDEF_ENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_WHSY_BIZDEF_ENTRY', 'T_TPO_WHSY_BIZDEF_ENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TPO_WHSY_BIZDEF_ENTRY_FK') CREATE INDEX IDX_TPO_WHSY_BIZDEF_ENTRY_FK ON T_TPO_WHSY_BIZDEF_ENTRY ( FID );
 
 
 EXEC P_ALTERPK 'PK_TPO_TYSBSF_BIZDEF_ENTRY_L', 'T_TPO_TYSBSF_BIZDEF_ENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TYSBSF_BIZDEF_ENTRY_L_0') CREATE INDEX IDX_TYSBSF_BIZDEF_ENTRY_L_0 ON T_TPO_TYSBSF_BIZDEF_ENTRY_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_TPO_WHSY_BIZDEF_ENTRY_L', 'T_TPO_WHSY_BIZDEF_ENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TPO_WHSY_BIZDEF_ENTRY_L_0') CREATE INDEX IDX_TPO_WHSY_BIZDEF_ENTRY_L_0 ON T_TPO_WHSY_BIZDEF_ENTRY_L ( FENTRYID ,FLOCALEID );



/**End D:\PDMTOOLS\PDM_UPGRADE_1.3\PDM_UPGRADE\PDM1\TPO_constraint.sql **/
