/**Begin D:\cgq\develop\document\dba\PDMTOOLS\PDMTOOLS\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\TCEPT_constraint.sql **/

 EXEC P_ALTERPK 'PK_TPO_TCEPT_BIZDEF_ENTRY', 'T_TPO_TCEPT_BIZDEF_ENTRY', 'FENTRYID', '1';

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

 EXEC P_ALTERPK 'PK_TPO_TCEPT_BIZDEF', 'T_TPO_TCEPT_BIZDEF', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TCEPT_BIZDEF_L', 'T_TPO_TCEPT_BIZDEF_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TCEPT_BIZDEF_TREE', 'T_TPO_TCEPT_BIZDEF_TREE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TCEPT_BIZDEF_TREE_L', 'T_TPO_TCEPT_BIZDEF_TREE_L', 'FPKID', '1';

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



/**End D:\cgq\develop\document\dba\PDMTOOLS\PDMTOOLS\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\TCEPT_constraint.sql **/
