/**Begin C:\PDM_UPGRADE\PDM1\SRC_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRC_PLANITEM', 'T_SRC_PLANITEM', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PLANITEM_FBIZNODEID') CREATE INDEX IDX_SRC_PLANITEM_FBIZNODEID ON T_SRC_PLANITEM ( FBIZNODEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PLANITEM_FBIZURGEID') CREATE INDEX IDX_SRC_PLANITEM_FBIZURGEID ON T_SRC_PLANITEM ( FBIZURGEID );


 EXEC P_ALTERPK 'PK_SRC_PLANITEM_L', 'T_SRC_PLANITEM_L', 'FPKID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PLANITEM_L_FNAME') CREATE INDEX IDX_SRC_PLANITEM_L_FNAME ON T_SRC_PLANITEM_L ( FNAME );


 EXEC P_ALTERPK 'PK_SRC_PLANSCHEME', 'T_SRC_PLANSCHEME', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_PLANSCHEME_L', 'T_SRC_PLANSCHEME_L', 'FPKID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PLANSCHEME_L_FNAME') CREATE INDEX IDX_SRC_PLANSCHEME_L_FNAME ON T_SRC_PLANSCHEME_L ( FNAME );


 EXEC P_ALTERPK 'PK_SRC_PLANSCHEMEENTRY', 'T_SRC_PLANSCHEMEENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_PLANSCHEME_TYPE', 'T_SRC_PLANSCHEME_TYPE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_PLANSCHEME_FLOW', 'T_SRC_PLANSCHEME_FLOW', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SOURCEPLAN', 'T_SRC_SOURCEPLAN', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_PRICECLARIFY', 'T_SRC_PRICECLARIFY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SCENE_SUPPLIER2', 'T_SRC_SCENE_SUPPLIER2', 'FPKID', '1';

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



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