Mercurial > dive4elements > framework
comparison ChangeLog @ 274:92166f7c3842
#50 Added code on database level to recognize the oldest collection item in a collection (-> master artifact).
artifacts/trunk@2071 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 07 Jun 2011 17:09:25 +0000 |
parents | 22a90706d32d |
children | e92d5944fe4b |
comparison
equal
deleted
inserted
replaced
273:22a90706d32d | 274:92166f7c3842 |
---|---|
1 2011-06-07 Ingo Weinzierl <ingo@intevation.de> | |
2 | |
3 flys/issue50 (Markierung von "Master-Artefakten" ermöglichen) | |
4 | |
5 * artifact-database/doc/schema-pg.sql, | |
6 artifact-database/doc/schema-h2.sql: Added a column 'creation' to the | |
7 collection_items table. This column is set to the current timestamp when a | |
8 new row is inserted in this table. The master artifact of a collection | |
9 is the artifact which collection item is the oldest collection item in | |
10 the collection. | |
11 Note: there might be older artifacts in the collection than the master | |
12 artifact, but there will never be an older collection item than the first | |
13 item when the collection was created. | |
14 | |
15 To update the db, use the following statements: | |
16 | |
17 ALTER TABLE collection_items ADD COLUMN creation TIMESTAMP; | |
18 UPDATE collection_items SET creation = CURRENT_TIMESTAMP; | |
19 ALTER TABLE collection_items ALTER COLUMN creation SET NOT NULL; | |
20 | |
21 * artifact-database/src/main/resources/sql/org-h2-driver.properties, | |
22 artifact-database/src/main/resources/sql/org-postgresql-driver.properties: | |
23 Order the list of collection items based on their creation time. | |
24 | |
1 2011-06-07 Ingo Weinzierl <ingo@intevation.de> | 25 2011-06-07 Ingo Weinzierl <ingo@intevation.de> |
2 | 26 |
3 * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java, | 27 * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java, |
4 artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java: | 28 artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java: |
5 Added a setCollectionTTL() method that might be used to update the TTL | 29 Added a setCollectionTTL() method that might be used to update the TTL |