view createPurlDB.sql @ 11:fad73212354b

wsgi addedx
author dwinter
date Mon, 05 Nov 2012 09:29:21 +0100
parents fb2a3b4542a4
children
line wrap: on
line source

-- Database: "purlDB"

-- DROP DATABASE "purlDB";

CREATE DATABASE "purlDB"
  WITH OWNER = postgres
       ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'C'
       LC_CTYPE = 'C'
       CONNECTION LIMIT = -1;
GRANT CONNECT, TEMPORARY ON DATABASE "purlDB" TO public;
GRANT ALL ON DATABASE "purlDB" TO postgres;
GRANT ALL ON DATABASE "purlDB" TO "purlUSER";


-- Table: purls

-- DROP TABLE purls;

CREATE TABLE purls
(
  purl text NOT NULL,
  path text,
  is_index_meta boolean NOT NULL,
  created_by text,
  created_at timestamp with time zone,
  last_change_by text,
  last_change_at text,
  validity integer NOT NULL,
  server_url text,
  CONSTRAINT purl PRIMARY KEY (purl )
)
WITH (
  OIDS=FALSE
);
ALTER TABLE purls
  OWNER TO postgres;
GRANT ALL ON TABLE purls TO postgres;
GRANT ALL ON TABLE purls TO "purlUSER";