/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_FA_CHANGE_MAPPING', 'T_FA_CHANGE_MAPPING', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_CHANGE_MAPPING_CARD') CREATE INDEX IDX_FA_CHANGE_MAPPING_CARD ON T_FA_CHANGE_MAPPING ( FCARDITEMID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_CHANGE_MAPPING_LEASE') CREATE INDEX IDX_FA_CHANGE_MAPPING_LEASE ON T_FA_CHANGE_MAPPING ( FLEASEITEMID );


 EXEC P_ALTERPK 'PK_T_FA_CHANGE_MAPPING_L', 'T_FA_CHANGE_MAPPING_L', 'FPKID', '1';

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

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