diff artifact-database/doc/schema-h2.sql @ 38:93edc04f3a10

Added postgresql support. artifacts/trunk@104 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 18 Sep 2009 09:34:14 +0000
parents
children 5e4bc24ea438
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifact-database/doc/schema-h2.sql	Fri Sep 18 09:34:14 2009 +0000
@@ -0,0 +1,20 @@
+--
+-- schema to store artifacts in H2 databases.
+--
+
+BEGIN;
+
+-- not using AUTO_INCREMENT to be more compatible with
+-- other dbms.
+CREATE SEQUENCE ARTIFACTS_ID_SEQ;
+
+CREATE TABLE artifacts (
+    id          INT PRIMARY KEY NOT NULL,
+    gid         UUID            NOT NULL UNIQUE,
+    creation    TIMESTAMP       NOT NULL,
+    last_access TIMESTAMP       NOT NULL,
+    ttl         BIGINT, -- NULL means eternal
+    data        BINARY
+);
+
+COMMIT;

http://dive4elements.wald.intevation.org