diff artifact-database/src/main/resources/sql/org-h2-driver.properties @ 542:9497f58484a0

Ugly: Filter collection items in user land.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 03 Sep 2015 17:00:30 +0200
parents 4213dd6ca169
children e9abf747f6ce
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-h2-driver.properties	Thu Sep 03 15:34:07 2015 +0200
+++ b/artifact-database/src/main/resources/sql/org-h2-driver.properties	Thu Sep 03 17:00:30 2015 +0200
@@ -9,9 +9,10 @@
 
 artifacts.touch=UPDATE artifacts SET last_access = CURRENT_TIMESTAMP WHERE id = ?
 
+collection.items.artifact.id=SELECT artifact_id FROM collection_items
+
 artifacts.outdated=SELECT id, factory, data, gid FROM artifacts WHERE ttl IS NOT NULL \
     AND DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) > ttl \
-    AND id NOT IN (SELECT DISTINCT artifact_id FROM collection_items) \
     AND id NOT IN ($LOCKED_IDS$) \
     LIMIT 50
 

http://dive4elements.wald.intevation.org