From 3e299ad6229b4fa4998dc29b576c57be55a480d0 Mon Sep 17 00:00:00 2001 From: mmaranda-cs Date: Mon, 1 Oct 2018 08:43:44 -0400 Subject: [PATCH 1/4] Fixing a comment. --- db/cpt_asset_table_views.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/cpt_asset_table_views.sql b/db/cpt_asset_table_views.sql index 5dd96e3d..defa6fc6 100644 --- a/db/cpt_asset_table_views.sql +++ b/db/cpt_asset_table_views.sql @@ -327,7 +327,7 @@ SELECT cst.name AS 'facility_component_subtype_name', - -- TODO Assed to fix sandbox and QA should be removed longer term + -- TODO Added to fix sandbox and QA should be removed longer term cst.name AS 'facility_subcomponent_type_name', transitAs.asset_id AS 'transit_asset_asset_id', From 215cdfb7268083b539362c4a949dc19467b3acdb Mon Sep 17 00:00:00 2001 From: mmaranda-cs Date: Wed, 17 Oct 2018 15:42:56 -0400 Subject: [PATCH 2/4] TTPLAT-490, TTPLAT-489 Updated the table view to not include NTD ID since we don't need this according the TTPLAT-489 also updated the data scripts to point at a more reliable field set for the FTA type. This feels a little fragile but it is what it is. The rusulting table_views.sql file will need to be updated across the deployments. Unless Lydia would prefer this as a script. --- db/cpt_asset_table_views.sql | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/db/cpt_asset_table_views.sql b/db/cpt_asset_table_views.sql index defa6fc6..a1755e1d 100644 --- a/db/cpt_asset_table_views.sql +++ b/db/cpt_asset_table_views.sql @@ -665,12 +665,20 @@ SELECT infra_division.name AS 'infrastructure_infrastructure_division_name', + infra_subdivision.name AS 'infrastructure_infrastructure_subdivision_name', + infra_gauge.name AS 'infrastructure_infrastructure_gauge_type_name', infra_track.name AS 'infrastructure_infrastructure_track_name', infra_segment_type.name AS'infrastructure_infrastructure_segment_name', + assets_fta_mode_types.id AS 'assets_fta_mode_types_id', + assets_fta_mode_types.asset_id AS 'assets_fta_mode_types_asset_id', + assets_fta_mode_types.transam_asset_id AS 'assets_fta_mode_types_transam_asset_id', + assets_fta_mode_types.fta_mode_type_id AS 'assets_fta_mode_types_fta_mode_type_id', + assets_fta_mode_types.is_primary AS 'assets_fta_mode_types_is_primary', + transitAs.asset_id AS 'transit_asset_asset_id', transitAs.contract_num AS 'transit_asset_contract_num', transitAs.contract_type_id AS 'transit_asset_contract_type_id', @@ -865,6 +873,7 @@ SELECT FROM infrastructures AS i LEFT JOIN transit_assets AS transitAs ON transitAs.transit_assetible_id = i.id AND transit_assetible_type = 'Infrastructure' LEFT JOIN infrastructure_divisions AS infra_division ON infra_division.id = i.infrastructure_division_id + LEFT JOIN infrastructure_subdivisions AS infra_subdivision ON infra_subdivision.id = i.infrastructure_subdivision_id LEFT JOIN infrastructure_gauge_types AS infra_gauge ON infra_gauge.id = i.infrastructure_gauge_type_id LEFT JOIN infrastructure_tracks AS infra_track ON infra_track.id = i.infrastructure_track_id LEFT JOIN infrastructure_segment_types AS infra_segment_type ON infra_segment_type.id = i.infrastructure_segment_type_id @@ -931,7 +940,7 @@ SELECT LEFT JOIN service_status_types AS service_status_type ON service_status_type.id = most_recent_service_status_event.service_status_type_id LEFT JOIN replacement_status_types AS replacement_status ON replacement_status.id = most_recent_early_replacement_event.replacement_status_type_id - LEFT JOIN assets_fta_mode_types AS afmt ON afmt.asset_id = transamAs.id AND afmt.is_primary + LEFT JOIN assets_fta_mode_types AS afmt ON afmt.transam_asset_id = i.id AND afmt.is_primary AND afmt.asset_id IS NULL LEFT JOIN fta_mode_types AS fmt ON fmt.id = afmt.fta_mode_type_id; -- ---------------------------------------------------------------------------------------------------------------- From 27b75331be90853818fb9ce87e84d1219f23b463 Mon Sep 17 00:00:00 2001 From: mmaranda-cs Date: Thu, 18 Oct 2018 08:57:57 -0400 Subject: [PATCH 3/4] TTPLAT-490, TTPLAT-489 Updated theview to include the correct name for assets_fta_mode_types aftmt, this was corrected in the transit version but not the cpt version. --- db/cpt_asset_table_views.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/cpt_asset_table_views.sql b/db/cpt_asset_table_views.sql index a1755e1d..6603e0f0 100644 --- a/db/cpt_asset_table_views.sql +++ b/db/cpt_asset_table_views.sql @@ -673,11 +673,11 @@ SELECT infra_segment_type.name AS'infrastructure_infrastructure_segment_name', - assets_fta_mode_types.id AS 'assets_fta_mode_types_id', - assets_fta_mode_types.asset_id AS 'assets_fta_mode_types_asset_id', - assets_fta_mode_types.transam_asset_id AS 'assets_fta_mode_types_transam_asset_id', - assets_fta_mode_types.fta_mode_type_id AS 'assets_fta_mode_types_fta_mode_type_id', - assets_fta_mode_types.is_primary AS 'assets_fta_mode_types_is_primary', + afmt.id AS 'assets_fta_mode_types_id', + afmt.asset_id AS 'assets_fta_mode_types_asset_id', + afmt.transam_asset_id AS 'assets_fta_mode_types_transam_asset_id', + afmt.fta_mode_type_id AS 'assets_fta_mode_types_fta_mode_type_id', + afmt.is_primary AS 'assets_fta_mode_types_is_primary', transitAs.asset_id AS 'transit_asset_asset_id', transitAs.contract_num AS 'transit_asset_contract_num', From ee24830f3af3c95d7d9a4109b5c089e43efe6b10 Mon Sep 17 00:00:00 2001 From: Lydia Chang Date: Fri, 19 Oct 2018 11:09:38 -0400 Subject: [PATCH 4/4] Bump version --- lib/transam_cpt/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transam_cpt/version.rb b/lib/transam_cpt/version.rb index 65d15bc0..411a94a7 100644 --- a/lib/transam_cpt/version.rb +++ b/lib/transam_cpt/version.rb @@ -1,3 +1,3 @@ module TransamCpt - VERSION = "2.3.6" + VERSION = "2.3.7" end