root/sql/tables/prism.saved_graphs_dep.sql

Revision 66c92038a4140676e18fc96716d36bb945eba924, 1.6 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 years ago)

prism tables

  • Property mode set to 100644
Line 
1 --
2 -- Name: saved_graphs_dep; Type: TABLE; Schema: prism; Owner: reconnoiter; Tablespace:
3 --
4
5 CREATE TABLE prism.saved_graphs_dep (
6     graphid uuid NOT NULL,
7     sid integer NOT NULL,
8     metric_name text NOT NULL,
9     metric_type character varying(22)
10 );
11
12
13 ALTER TABLE prism.saved_graphs_dep OWNER TO reconnoiter;
14
15 --
16 -- Name: saved_graphs_dep_pkey; Type: CONSTRAINT; Schema: prism; Owner: reconnoiter; Tablespace:
17 --
18
19 ALTER TABLE ONLY prism.saved_graphs_dep
20     ADD CONSTRAINT saved_graphs_dep_pkey PRIMARY KEY (graphid, sid, metric_name);
21
22
23 --
24 -- Name: saved_graphs_dep_sid_name_type; Type: INDEX; Schema: prism; Owner: reconnoiter; Tablespace:
25 --
26
27 CREATE INDEX saved_graphs_dep_sid_name_type ON prism.saved_graphs_dep USING btree (sid, metric_name, metric_type);
28
29
30 --
31 -- Name: saved_graphs_dep_graphid_fkey; Type: FK CONSTRAINT; Schema: prism; Owner: reconnoiter
32 --
33
34 ALTER TABLE ONLY prism.saved_graphs_dep
35     ADD CONSTRAINT saved_graphs_dep_graphid_fkey FOREIGN KEY (graphid) REFERENCES prism.saved_graphs(graphid) ON DELETE CASCADE;
36
37
38 --
39 -- Name: saved_graphs_dep_sid_fkey; Type: FK CONSTRAINT; Schema: prism; Owner: reconnoiter
40 --
41
42 ALTER TABLE ONLY prism.saved_graphs_dep
43     ADD CONSTRAINT saved_graphs_dep_sid_fkey FOREIGN KEY (sid, metric_name, metric_type) REFERENCES noit.metric_name_summary(sid, metric_name, metric_type);
44
45
46 --
47 -- Name: saved_graphs_dep; Type: ACL; Schema: prism; Owner: reconnoiter
48 --
49
50 REVOKE ALL ON TABLE prism.saved_graphs_dep FROM PUBLIC;
51 REVOKE ALL ON TABLE prism.saved_graphs_dep FROM reconnoiter;
52 GRANT ALL ON TABLE prism.saved_graphs_dep TO reconnoiter;
53 GRANT ALL ON TABLE prism.saved_graphs_dep TO prism;
54
55
Note: See TracBrowser for help on using the browser.