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

 EXEC P_ALTERPK 'PK_MDS_DSPDELIVERY', 'T_MDS_DSPDELIVERY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_MDS_DSPSTOCKSET', 'T_MDS_DSPSTOCKSET', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_MDS_DSPSTOCKSTATUS', 'T_MDS_DSPSTOCKSTATUS', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_MDS_DSPSTOCKTYPE', 'T_MDS_DSPSTOCKTYPE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_MDS_DSPWORKORDER', 'T_MDS_DSPWORKORDER', 'FENTRYID', '1';

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



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