/**Begin C:\PDM_UPGRADE\PDM1\SRC_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRC_OPENAPPLY_SUP', 'T_SRC_OPENAPPLY_SUP', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_OPENAPPLY_SUP_FPAG') CREATE INDEX IDX_OPENAPPLY_SUP_FPAG ON T_SRC_OPENAPPLY_SUP ( FPACKAGEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_OPENAPPLY_SUP_FPID') CREATE INDEX IDX_OPENAPPLY_SUP_FPID ON T_SRC_OPENAPPLY_SUP ( FPARENTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_OPENAPPLY_SUP_FSUP') CREATE INDEX IDX_OPENAPPLY_SUP_FSUP ON T_SRC_OPENAPPLY_SUP ( FSUPPLIERID );

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


 EXEC P_ALTERPK 'PK_SRC_BIDOPENAPPLY', 'T_SRC_BIDOPENAPPLY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_OPENAPPLY_OPEN', 'T_SRC_OPENAPPLY_OPEN', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_OPENAPPLY_OPEN_PID') CREATE INDEX IDX_SRC_OPENAPPLY_OPEN_PID ON T_SRC_OPENAPPLY_OPEN ( FPACKAGEID );


 EXEC P_ALTERPK 'PK_SRC_OPENAPPLY_MAN', 'T_SRC_OPENAPPLY_MAN', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_OPENAPPLY_MAN_FBID') CREATE INDEX IDX_SRC_OPENAPPLY_MAN_FBID ON T_SRC_OPENAPPLY_MAN ( FBIDDERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_OPENAPPLY_MAN_FBIZ') CREATE INDEX IDX_SRC_OPENAPPLY_MAN_FBIZ ON T_SRC_OPENAPPLY_MAN ( FBIZROLEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_OPENAPPLY_MAN_FPID') CREATE INDEX IDX_SRC_OPENAPPLY_MAN_FPID ON T_SRC_OPENAPPLY_MAN ( FPARENTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_OPENAPPLY_MAN_FTYPE') CREATE INDEX IDX_SRC_OPENAPPLY_MAN_FTYPE ON T_SRC_OPENAPPLY_MAN ( FTYPE );

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



/**End C:\PDM_UPGRADE\PDM1\SRC_constraint.sql **/
