/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AI_constraint.sql **/
 EXEC P_ALTERPK 'PK_FAH_EXT_DATA_ERR', 'T_FAH_EXT_DATA_ERR', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FAH_EXT_DATA_ERR' AND KSQL_INDNAME = 'IDX_FAH_EXT_DATA_ERR_DATAID') CREATE INDEX IDX_FAH_EXT_DATA_ERR_DATAID ON T_FAH_EXT_DATA_ERR ( FDATAID );


 EXEC P_ALTERPK 'PK_FAH_EXT_MODFLDGRP', 'T_FAH_EXT_MODFLDGRP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FAH_EXT_MODFLDGRP' AND KSQL_INDNAME = 'IDX_FAH_EXT_MODFLDGRP_MID') CREATE INDEX IDX_FAH_EXT_MODFLDGRP_MID ON T_FAH_EXT_MODFLDGRP ( FMODELID );


 EXEC P_ALTERPK 'PK_FAH_EXT_MODFLDS', 'T_FAH_EXT_MODFLDS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FAH_EXT_MODFLDS' AND KSQL_INDNAME = 'IDX_FAH_EXT_MODFLDS_MG') CREATE INDEX IDX_FAH_EXT_MODFLDS_MG ON T_FAH_EXT_MODFLDS ( FMODELID ,FGROUPID );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AI_constraint.sql **/
