Mercurial > dive4elements > framework
comparison artifact-database/src/main/resources/sql/org-h2-driver.properties @ 195:63f555bbdbc0
Fix a foreign key constraint violation when deleting outdated artifacts.
artifacts/trunk@1425 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 08 Mar 2011 10:35:40 +0000 |
parents | 949d69ad3756 |
children | 94654cbf8db2 |
comparison
equal
deleted
inserted
replaced
194:fde2f193e846 | 195:63f555bbdbc0 |
---|---|
8 data = ? WHERE id = ? | 8 data = ? WHERE id = ? |
9 | 9 |
10 artifacts.touch=UPDATE artifacts SET last_access = CURRENT_TIMESTAMP WHERE id = ? | 10 artifacts.touch=UPDATE artifacts SET last_access = CURRENT_TIMESTAMP WHERE id = ? |
11 | 11 |
12 artifacts.outdated=SELECT id, factory, data FROM artifacts WHERE ttl IS NOT NULL \ | 12 artifacts.outdated=SELECT id, factory, data FROM artifacts WHERE ttl IS NOT NULL \ |
13 AND DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) > ttl LIMIT 50 | 13 AND DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) > ttl \ |
14 AND id NOT IN (SELECT UNIQUE artifact_id FROM collection_items) \ | |
15 LIMIT 50 | |
14 | 16 |
15 artifacts.select.gid=SELECT id, last_access, ttl, factory, data FROM artifacts WHERE gid = ? | 17 artifacts.select.gid=SELECT id, last_access, ttl, factory, data FROM artifacts WHERE gid = ? |
16 | 18 |
17 artifacts.get.id=SELECT id FROM artifacts WHERE gid = ? | 19 artifacts.get.id=SELECT id FROM artifacts WHERE gid = ? |
18 | 20 |