       LEFT JOIN asset_fleets AS fleets ON fleets.id = aafleet.asset_fleet_id
 
       LEFT JOIN fta_asset_classes AS fta_asset_class ON fta_asset_class.id = transitAs.fta_asset_class_id
-      LEFT JOIN fta_vehicle_types AS fta_vehicle_type ON fta_vehicle_type.id = transitAs.fta_type_id
+      LEFT JOIN fta_equipment_types AS fta_equipment_type ON fta_equipment_type.id = transitAs.fta_type_id
       LEFT JOIN asset_subtypes AS ast ON ast.id = transamAs.asset_subtype_id
       LEFT JOIN transam_assets AS location ON location.id = transamAs.location_id
       LEFT JOIN manufacturers AS manufacturer ON manufacturer.id = transamAs.manufacturer_id

      LEFT JOIN transam_assets AS cTransamAs ON cTransamAs.parent_id = transamAs.id
      LEFT JOIN transit_assets AS cTransitAs ON cTransitAs.id = cTransamAs.transam_assetible_id
      LEFT JOIN components AS c ON c.id = cTransitAs.transit_assetible_id
      LEFT JOIN component_types AS ct ON ct.id = c.component_type_id
      LEFT JOIN component_subtypes As cst on cst.id = c.component_subtype_id;
      
-- ----------------------------------------------------------------------------------------------------------------
-- ----------------------------------------------------------------------------------------------------------------

-- ----------------------------------------------------------------------------------------------------------------

DROP VIEW if exists facility_primary_asset_table_views;
      CREATE OR REPLACE VIEW facility_primary_asset_table_views AS
      SELECT
        f.id,
        f.id AS 'facility_id',
