/**Begin D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\BDM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BDM_AGRIC_GOODSCODE', 'T_BDM_AGRIC_GOODSCODE', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BDM_AGRIC_CREATETIME') CREATE INDEX IDX_BDM_AGRIC_CREATETIME ON T_BDM_AGRIC_GOODSCODE ( FCREATETIME );


 EXEC P_ALTERPK 'PK_T_BDM_AGRIC_GOODSCODE_L', 'T_BDM_AGRIC_GOODSCODE_L', 'FPKID', '1';

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



/**End D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\BDM_constraint.sql **/
