annotate artifact-database/doc/schema-h2.sql @ 39:075cb3778d71

Added some IDE-specific files to the Ignorelist. artifacts/trunk@107 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 21 Sep 2009 11:56:10 +0000
parents 93edc04f3a10
children 5e4bc24ea438
rev   line source
38
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 --
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2 -- schema to store artifacts in H2 databases.
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 --
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
5 BEGIN;
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 -- not using AUTO_INCREMENT to be more compatible with
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8 -- other dbms.
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 CREATE SEQUENCE ARTIFACTS_ID_SEQ;
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 CREATE TABLE artifacts (
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 id INT PRIMARY KEY NOT NULL,
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 gid UUID NOT NULL UNIQUE,
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 creation TIMESTAMP NOT NULL,
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 last_access TIMESTAMP NOT NULL,
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16 ttl BIGINT, -- NULL means eternal
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 data BINARY
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 );
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19
93edc04f3a10 Added postgresql support.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20 COMMIT;

http://dive4elements.wald.intevation.org