/**Begin C:\anzhuang\PDM_UPGRADE\PDM1\TPO_constraint.sql **/
 EXEC P_ALTERPK 'PK_TPO_ZDSY_BIZDEF', 'T_TPO_ZDSY_BIZDEF', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TPO_ZDSY_NUM') CREATE INDEX IDX_TPO_ZDSY_NUM ON T_TPO_ZDSY_BIZDEF ( FLONGNUMBER ,FNUMBER ,FGROUPID );


 EXEC P_ALTERPK 'PK_TPO_ZDSY_BIZDEF_ENTRY', 'T_TPO_ZDSY_BIZDEF_ENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_ZDSY_BIZDEF_ENTRY_L', 'T_TPO_ZDSY_BIZDEF_ENTRY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_ZDSY_BIZDEF_L', 'T_TPO_ZDSY_BIZDEF_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_ZDSY_BIZDEF_TREE', 'T_TPO_ZDSY_BIZDEF_TREE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TPO_ZDSYTREE_NUM') CREATE INDEX IDX_TPO_ZDSYTREE_NUM ON T_TPO_ZDSY_BIZDEF_TREE ( FLONGNUMBER );


 EXEC P_ALTERPK 'PK_TPO_ZDSY_BIZDEF_TREE_L', 'T_TPO_ZDSY_BIZDEF_TREE_L', 'FPKID', '1';

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



/**End C:\anzhuang\PDM_UPGRADE\PDM1\TPO_constraint.sql **/
