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