
sascha@38: --
sascha@38: -- schema to store artifacts in H2 databases.
sascha@38: --
sascha@38: 
sascha@38: BEGIN;
sascha@38: 
sascha@38: -- not using AUTO_INCREMENT to be more compatible with
sascha@38: -- other dbms.
sascha@38: CREATE SEQUENCE ARTIFACTS_ID_SEQ;
sascha@38: 
sascha@38: CREATE TABLE artifacts (
sascha@38:     id          INT PRIMARY KEY NOT NULL,
sascha@38:     gid         UUID            NOT NULL UNIQUE,
sascha@38:     creation    TIMESTAMP       NOT NULL,
sascha@38:     last_access TIMESTAMP       NOT NULL,
sascha@38:     ttl         BIGINT, -- NULL means eternal
sascha@38:     data        BINARY
sascha@38: );
sascha@38: 
sascha@38: COMMIT;




