20190611124800000__added_active_flag_to_facility_type_approved_products.sql

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Ok, I will fix it

Ok, I will fix it

Okay, I see but it is incorrect. Currently, you add this to the INNER JOIN step but this is not related with joining FTAP and facility types tables. This should be in the where phrase because your ...

Okay, I see but it is incorrect. Currently, you add this to the INNER JOIN step but this is not related with joining FTAP and facility types tables. This should be in the where phrase because your check is related only with FTAP table.

However, it works (see shouldSearchByActiveFlag() test in FacilityTypeApprovedProductRepositoryIntegrationTest). The final query looks as follows:    SELECT DISTINCT ftap.id AS ID FROM referenceda...

However, it works (see shouldSearchByActiveFlag() test in FacilityTypeApprovedProductRepositoryIntegrationTest). The final query looks as follows:

   SELECT DISTINCT ftap.id AS ID FROM referencedata.facility_type_approved_products AS ftap 
INNER JOIN referencedata.programs AS p ON p.id = ftap.programId AND p.id = :programId 
INNER JOIN referencedata.orderables AS o ON o.id = ftap.orderableId AND o.versionId IN (   SELECT MAX(versionId)   FROM referencedata.orderables   WHERE id = o.id) 
INNER JOIN referencedata.program_orderables AS po ON o.id = po.orderableId AND o.versionId = po.orderableVersionId AND p.id = po.programId AND po.active IS TRUE AND po.fullSupply = :fullSupply 
INNER JOIN referencedata.facility_types AS ft ON ft.id = ftap.facilityTypeId AND ft.id = :facilityTypeId AND ftap.active = :active LIMIT :limit OFFSET :offset;
I don't think that this will work. This should be in the where phrase

I don't think that this will work. This should be in the where phrase

OLMIS-6352: Added active flag to Facility Type Approved Product
OLMIS-6352: Added active flag to Facility Type Approved Product
OLMIS-6352: Corrected FTAP migrations with active flag

    • -1
    • +0
    ./20190611124800000__added_active_flag_to_facility_type_approved_products.sql
  1. … 2 more files in changeset.
OLMIS-6352: Added active flag to FacilityTypeApprovedProducts

    • -0
    • +1
    ./20190611124800000__added_active_flag_to_facility_type_approved_products.sql
  1. … 16 more files in changeset.
WIP

    • -0
    • +1
    ./20190611124800000__added_active_flag_to_facility_type_approved_products.sql
  1. … 15 more files in changeset.
WIP

    • -0
    • +1
    ./20190611124800000__added_active_flag_to_facility_type_approved_products.sql
  1. … 14 more files in changeset.
WIP

    • -0
    • +1
    ./20190611124800000__added_active_flag_to_facility_type_approved_products.sql
  1. … 14 more files in changeset.
WIP

    • -0
    • +1
    ./20190611124800000__added_active_flag_to_facility_type_approved_products.sql
  1. … 14 more files in changeset.