
sascha@38: --
sascha@38: -- schema to store artifacts in PostgreSQL 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@41:     factory     VARCHAR(256)    NOT NULL,
sascha@38:     data        bytea
sascha@38: );
sascha@38: 
sascha@38: COMMIT;




