Mercurial > dive4elements > framework
diff artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 314:31ee2b3b5a57
forward list of deleted collections and artifacts from data cleaner to backend to backend listeners.
artifacts/trunk@2445 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 02 Aug 2011 11:11:59 +0000 |
parents | a077bb098eb4 |
children | 824051dff018 |
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-postgresql-driver.properties Mon Aug 01 15:43:44 2011 +0000 +++ b/artifact-database/src/main/resources/sql/org-postgresql-driver.properties Tue Aug 02 11:11:59 2011 +0000 @@ -9,7 +9,7 @@ artifacts.touch=UPDATE artifacts SET last_access = CURRENT_TIMESTAMP WHERE id = ? -artifacts.outdated=SELECT id, factory, data FROM artifacts WHERE ttl IS NOT NULL \ +artifacts.outdated=SELECT id, factory, data, gid FROM artifacts WHERE ttl IS NOT NULL \ AND CURRENT_TIMESTAMP - last_access > (ttl || ' milliseconds')::interval \ AND id NOT IN (SELECT DISTINCT artifact_id FROM collection_items) \ AND id NOT IN ($LOCKED_IDS$) \ @@ -91,7 +91,7 @@ # COLLECTIONS collections.outdated= \ - SELECT c.id FROM collections c \ + SELECT c.id, c.gid FROM collections c \ INNER JOIN collection_items ci ON c.id = ci.collection_id \ INNER JOIN artifacts a ON ci.artifact_id = a.id \ WHERE c.ttl IS NOT NULL \