Mercurial > dive4elements > river
view flys-artifacts/src/main/resources/datacage-sql/org-h2-driver.properties @ 990:e573c4715d81
Add artifacts data into datacage db at initial scan.
flys-artifacts/trunk@2422 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 29 Jul 2011 08:40:11 +0000 |
parents | f3be883325ce |
children | c675b4a87201 |
line wrap: on
line source
delete.all.users = DELETE FROM users user.id.nextval = SELECT NEXTVAL('USERS_ID_SEQ') user.by.gid = SELECT id FROM users WHERE gid = ? insert.user = INSERT INTO users (id, gid) VALUES (?, ?) collection.by.gid = SELECT id FROM collections WHERE gid = ? collection.id.nextval = SELECT NEXTVAL('COLLECTIONS_ID_SEQ') insert.collection = INSERT INTO collections (id, gid, user_id, name) VALUES (?, ?, ?, ?) artifact.by.gid = SELECT id FROM artifacts WHERE gid = ? collection.item.id.nextval = SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ') insert.collection.item = INSERT INTO collection_items (id, collection_id, artifact_id) VALUES (?, ?, ?) artifact.id.nextval = SELECT NEXTVAL('ARTIFACTS_ID_SEQ') insert.artifact = INSERT INTO artifacts (id, gid, state) VALUES (?, ?, ?) artifact.data.id.nextval = SELECT NEXTVAL('ARTIFACT_DATA_ID_SEQ') insert.artifact.data = INSERT INTO artifact_data (id, artifact_id, kind, k, v) VALUES (?, ?, ?, ?, ?)