aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-03-17 21:31:14 +0000
committerKristian Lyngstol <kly@kly.no>2016-03-17 21:31:14 +0000
commit151f2403dec93d32199afea4ceff9833b8980cf4 (patch)
treee32dc2945ea4601252f269505b308a89c7113f90
parent5c9d6d10dc7e53a8d06fbd056ded591a6b583167 (diff)
NMS: Update schema to "final" version
-rw-r--r--nms/nms-dump.sql52
1 files changed, 29 insertions, 23 deletions
diff --git a/nms/nms-dump.sql b/nms/nms-dump.sql
index c123554..1480827 100644
--- a/nms/nms-dump.sql
+++ b/nms/nms-dump.sql
@@ -272,18 +272,17 @@ SET default_tablespace = '';
SET default_with_oids = false;
--
--- Name: dhcp; Type: TABLE; Schema: public; Owner: nms; Tablespace:
+-- Name: dhcp; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE dhcp (
- switch integer NOT NULL,
- network cidr NOT NULL,
- last_ack timestamp without time zone,
- owner_color character varying
+ switch integer,
+ "time" timestamp without time zone,
+ mac macaddr
);
-ALTER TABLE dhcp OWNER TO nms;
+ALTER TABLE dhcp OWNER TO postgres;
--
-- Name: linknet_ping; Type: TABLE; Schema: public; Owner: nms; Tablespace:
@@ -492,7 +491,8 @@ CREATE TABLE switches (
secondary_ip inet,
placement box,
subnet4 cidr,
- subnet6 cidr
+ subnet6 cidr,
+ distro character varying
);
@@ -582,6 +582,20 @@ ALTER TABLE ONLY switches
--
+-- Name: dhcp_switch; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
+--
+
+CREATE INDEX dhcp_switch ON dhcp USING btree (switch);
+
+
+--
+-- Name: dhcp_time; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
+--
+
+CREATE INDEX dhcp_time ON dhcp USING btree ("time");
+
+
+--
-- Name: ping_index; Type: INDEX; Schema: public; Owner: nms; Tablespace:
--
@@ -659,13 +673,6 @@ CREATE INDEX switch_temp_index ON switch_temp USING btree (switch);
--
--- Name: switches_dhcp; Type: INDEX; Schema: public; Owner: nms; Tablespace:
---
-
-CREATE UNIQUE INDEX switches_dhcp ON dhcp USING btree (switch);
-
-
---
-- Name: switches_switch; Type: INDEX; Schema: public; Owner: nms; Tablespace:
--
@@ -687,6 +694,14 @@ CREATE INDEX updated_index3 ON ping_secondary_ip USING btree ("time");
--
+-- Name: dhcp_switch_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY dhcp
+ ADD CONSTRAINT dhcp_switch_fkey FOREIGN KEY (switch) REFERENCES switches(switch);
+
+
+--
-- Name: snmp_switch_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
@@ -729,15 +744,6 @@ GRANT ALL ON SCHEMA public TO PUBLIC;
--
--- Name: dhcp; Type: ACL; Schema: public; Owner: nms
---
-
-REVOKE ALL ON TABLE dhcp FROM PUBLIC;
-REVOKE ALL ON TABLE dhcp FROM nms;
-GRANT ALL ON TABLE dhcp TO nms;
-
-
---
-- Name: seen_mac; Type: ACL; Schema: public; Owner: nms
--