annotate createPurlDB.sql @ 11:fad73212354b

wsgi addedx
author dwinter
date Mon, 05 Nov 2012 09:29:21 +0100
parents fb2a3b4542a4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
1 -- Database: "purlDB"
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
2
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
3 -- DROP DATABASE "purlDB";
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
4
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
5 CREATE DATABASE "purlDB"
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
6 WITH OWNER = postgres
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
7 ENCODING = 'UTF8'
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
8 TABLESPACE = pg_default
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
9 LC_COLLATE = 'C'
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
10 LC_CTYPE = 'C'
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
11 CONNECTION LIMIT = -1;
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
12 GRANT CONNECT, TEMPORARY ON DATABASE "purlDB" TO public;
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
13 GRANT ALL ON DATABASE "purlDB" TO postgres;
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
14 GRANT ALL ON DATABASE "purlDB" TO "purlUSER";
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
15
fb2a3b4542a4 restservice
dwinter
parents: 0
diff changeset
16
0
dwinter
parents:
diff changeset
17 -- Table: purls
dwinter
parents:
diff changeset
18
dwinter
parents:
diff changeset
19 -- DROP TABLE purls;
dwinter
parents:
diff changeset
20
dwinter
parents:
diff changeset
21 CREATE TABLE purls
dwinter
parents:
diff changeset
22 (
dwinter
parents:
diff changeset
23 purl text NOT NULL,
dwinter
parents:
diff changeset
24 path text,
dwinter
parents:
diff changeset
25 is_index_meta boolean NOT NULL,
dwinter
parents:
diff changeset
26 created_by text,
dwinter
parents:
diff changeset
27 created_at timestamp with time zone,
dwinter
parents:
diff changeset
28 last_change_by text,
dwinter
parents:
diff changeset
29 last_change_at text,
dwinter
parents:
diff changeset
30 validity integer NOT NULL,
dwinter
parents:
diff changeset
31 server_url text,
dwinter
parents:
diff changeset
32 CONSTRAINT purl PRIMARY KEY (purl )
dwinter
parents:
diff changeset
33 )
dwinter
parents:
diff changeset
34 WITH (
dwinter
parents:
diff changeset
35 OIDS=FALSE
dwinter
parents:
diff changeset
36 );
dwinter
parents:
diff changeset
37 ALTER TABLE purls
dwinter
parents:
diff changeset
38 OWNER TO postgres;
dwinter
parents:
diff changeset
39 GRANT ALL ON TABLE purls TO postgres;
dwinter
parents:
diff changeset
40 GRANT ALL ON TABLE purls TO "purlUSER";