/**Begin D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
 EXEC P_ALTERPK 'PK_MSPLAN_EQNEEDPLANENTRY', 'T_MSPLAN_EQNEEDPLANENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_MSPLAN_EQNEEDPLANWK', 'T_MSPLAN_EQNEEDPLANWK', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_MSPLAN_EQNEEDPLAN', 'T_MSPLAN_EQNEEDPLAN', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_EQNEEDPLAN_FK') CREATE INDEX IDX_MSPLAN_EQNEEDPLAN_FK ON T_MSPLAN_EQNEEDPLAN ( FBILLSTATUS );



/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
