From ad38438a0b980ee816e1573bf18362e72345fa4d Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Tue, 22 Apr 2025 21:33:42 +0200
Subject: webmap-import: Fingerprint destination layers to detect changes.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Comparing modification times is not enough since some sources (for
instance Naturvårdsverket's SCI_Rikstackande) are updated on the server
even though no objects are being added; the source layer remains
unchanged but the file differs because of OBJECTID changes we are not
interested in.
---
 schema.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 0afcee2..c9079f9 100644
--- a/schema.sql
+++ b/schema.sql
@@ -3012,7 +3012,8 @@ ALTER SEQUENCE postgis."vbk:vindkraftverk_ogc_fid_seq" OWNED BY postgis."vbk:vin
 CREATE TABLE public.layercache (
     ogc_fid bigint NOT NULL,
     layername character varying(255) NOT NULL,
-    last_updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
+    last_updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    fingerprint bytea NOT NULL
 );
 
 
-- 
cgit v1.2.3

