From 5b2190fdb364dae28ff79d1812bdaf44b8633990 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Fri, 18 Sep 2020 11:15:01 +0100 Subject: [PATCH] Add useful comments for importer --- .../wdpa/protected_area_importer/attribute_importer.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/modules/wdpa/protected_area_importer/attribute_importer.rb b/lib/modules/wdpa/protected_area_importer/attribute_importer.rb index b9fc395d5..9fc18dcb3 100644 --- a/lib/modules/wdpa/protected_area_importer/attribute_importer.rb +++ b/lib/modules/wdpa/protected_area_importer/attribute_importer.rb @@ -20,6 +20,11 @@ def self.create_protected_area(attributes) protected_area_id = nil begin ActiveRecord::Base.transaction(requires_new: true) do + # Below lines were needed on staging as the ProtectedArea model + # wasn't getting the new columns information after switching from the + # postgres db to the newly created db + #ProtectedArea.connection.schema_cache.clear! + #ProtectedArea.reset_column_information protected_area_id = ProtectedArea.create!(standardised_attributes).id end rescue