/**Begin C:\PDM_UPGRADE\sharepdmdir\pbd\pdm1\PBD_constraint.sql **/
 EXEC P_ALTERPK 'PK_PBD_TODOCONFIG', 'T_PBD_TODOCONFIG', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_TODO_CONFIG_FMASTERID') CREATE INDEX IDX_PBD_TODO_CONFIG_FMASTERID ON T_PBD_TODOCONFIG ( FMASTERID );


 EXEC P_ALTERPK 'PK_PBD_TODOCONFIG_L', 'T_PBD_TODOCONFIG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_PBD_TODOCONFIGENTRY', 'T_PBD_TODOCONFIGENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_TODOCFGENTRY_FID_FSEQ') CREATE INDEX IDX_PBD_TODOCFGENTRY_FID_FSEQ ON T_PBD_TODOCONFIGENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_TODOSTATUS', 'T_PBD_TODOSTATUS', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_TODO_STATUS_FMASTERID') CREATE INDEX IDX_PBD_TODO_STATUS_FMASTERID ON T_PBD_TODOSTATUS ( FMASTERID );


 EXEC P_ALTERPK 'PK_PBD_TODOSTATUS_L', 'T_PBD_TODOSTATUS_L', 'FPKID', '1';

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



/**End C:\PDM_UPGRADE\sharepdmdir\pbd\pdm1\PBD_constraint.sql **/
