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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_EB_EXAMINEPLANT') CREATE INDEX IX_EB_EXAMINEPLANT ON T_EB_EXAMINEPLAN ( FCREATEORG );


 EXEC P_ALTERPK 'PK_T_EB_EXAMINEPLANFYEAR', 'T_EB_EXAMINEPLANFYEAR', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_EXAMINEPLANORG', 'T_EB_EXAMINEPLANORG', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_EXAMINEPLANPERIOD', 'T_EB_EXAMINEPLANPERIOD', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_EXAMINEPLANVERSION', 'T_EB_EXAMINEPLANVERSION', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_PLANREFEXAMINE', 'T_EB_PLANREFEXAMINE', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_PLANREFEXAMINE') CREATE INDEX IDX_EB_PLANREFEXAMINE ON T_EB_PLANREFEXAMINE ( FEXAMINEID );



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