/**Begin D:\PDM_UPGRADE\PDM1\EB_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_EB_BGDECOMPOSE', 'T_EB_BGDECOMPOSE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_BGDECOMPOSE_FMODELID') CREATE INDEX IDX_EB_BGDECOMPOSE_FMODELID ON T_EB_BGDECOMPOSE ( FMODELID ,FBGAPPLYSCHEME );


 EXEC P_ALTERPK 'PK_EB_DECOMPOSESCHEME', 'T_EB_DECOMPOSESCHEME', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_EB_DECOMPOSESCHEME_L', 'T_EB_DECOMPOSESCHEME_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_EB_DECOMSCHEME_ENTRY', 'T_EB_DECOMSCHEME_ENTRY', 'FENTRYID', '1';

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


/**End D:\PDM_UPGRADE\PDM1\EB_constraint.sql **/
