/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_constraint.sql **/
EXEC P_ALTERPK 'PK_T_FA_BARCODE_UPGRADE_REC', 'T_FA_BARCODE_UPGRADE_REC', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_BARCODE_UPGRADE_REC' AND KSQL_INDNAME = 'IDX_FA_BARCODE_UP_FID') CREATE INDEX IDX_FA_BARCODE_UP_FID ON T_FA_BARCODE_UPGRADE_REC ( FID );


EXEC P_ALTERPK 'PK_FA_BARCODE_UPGRADE_LOG', 'T_FA_BARCODE_UPGRADE_LOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_BARCODE_UPGRADE_LOG' AND KSQL_INDNAME = 'IDX_FA_BARCODE_UPGRADE') CREATE INDEX IDX_FA_BARCODE_UPGRADE ON T_FA_BARCODE_UPGRADE_LOG ( FSTATUS ,FSTARTDATE );



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