Changeset 3278b4e18773a14f0cf214226356adbc065fa9be

Show
Ignore:
Timestamp:
09/29/09 21:43:28 (5 years ago)
Author:
Robert Treat <robert@omniti.com>
git-committer:
Robert Treat <robert@omniti.com> 1254260608 +0000
git-parent:

[378ef447b1015a081fe182f16097392fa036a9ce]

git-author:
Robert Treat <robert@omniti.com> 1254260608 +0000
Message:

tag tables

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sql/tables/noit.check_tag.sql

    ra34bc12 r3278b4e  
    11-- formerly check_tags 
     2 
     3-- 
     4-- PostgreSQL database dump 
     5-- 
     6 
     7SET client_encoding = 'UTF8'; 
     8SET standard_conforming_strings = off; 
     9SET check_function_bodies = false; 
     10SET client_min_messages = warning; 
     11SET escape_string_warning = off; 
     12 
     13SET search_path = stratcon, pg_catalog; 
     14 
     15SET default_tablespace = ''; 
     16 
     17SET default_with_oids = false; 
     18 
     19-- 
     20-- Name: check_tag; Type: TABLE; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     21-- 
     22 
     23CREATE TABLE check_tag ( 
     24    sid integer NOT NULL, 
     25    tags_array text[] 
     26); 
     27 
     28 
     29ALTER TABLE stratcon.check_tag OWNER TO reconnoiter; 
     30 
     31-- 
     32-- Name: check_tag_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     33-- 
     34 
     35ALTER TABLE ONLY check_tag 
     36    ADD CONSTRAINT check_tag_pkey PRIMARY KEY (sid); 
     37 
     38 
     39-- 
     40-- Name: update_metric_name_summary_fulltext; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
     41-- 
     42 
     43CREATE TRIGGER update_metric_name_summary_fulltext  
     44    AFTER INSERT OR UPDATE ON check_tag 
     45    FOR EACH ROW 
     46    EXECUTE PROCEDURE update_mns_via_check_tag(); 
     47 
     48 
     49-- 
     50-- Name: check_tag_sid_fkey; Type: FK CONSTRAINT; Schema: stratcon; Owner: reconnoiter 
     51-- 
     52 
     53ALTER TABLE ONLY check_tag 
     54    ADD CONSTRAINT check_tag_sid_fkey FOREIGN KEY (sid) REFERENCES map_uuid_to_sid(sid); 
     55 
     56 
     57-- 
     58-- Name: check_tag; Type: ACL; Schema: stratcon; Owner: reconnoiter 
     59-- 
     60 
     61REVOKE ALL ON TABLE check_tag FROM PUBLIC; 
     62REVOKE ALL ON TABLE check_tag FROM reconnoiter; 
     63GRANT ALL ON TABLE check_tag TO reconnoiter; 
     64GRANT ALL ON TABLE check_tag TO prism; 
     65GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE check_tag TO stratcon; 
     66 
     67 
     68-- 
     69-- PostgreSQL database dump complete 
     70-- 
     71 
  • sql/tables/noit.metric_tag.sql

    ra34bc12 r3278b4e  
    1 -- formerly metric_tags  
     1- formerly metric_tags  
     2-- 
     3-- PostgreSQL database dump 
     4-- 
     5 
     6SET client_encoding = 'UTF8'; 
     7SET standard_conforming_strings = off; 
     8SET check_function_bodies = false; 
     9SET client_min_messages = warning; 
     10SET escape_string_warning = off; 
     11 
     12SET search_path = noit, pg_catalog; 
     13 
     14SET default_tablespace = ''; 
     15 
     16SET default_with_oids = false; 
     17 
     18-- 
     19-- Name: metric_tag; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:  
     20-- 
     21 
     22CREATE TABLE metric_tag ( 
     23    sid integer NOT NULL, 
     24    metric_name text NOT NULL, 
     25    tags_array text[] 
     26); 
     27 
     28 
     29ALTER TABLE noit.metric_tag OWNER TO reconnoiter; 
     30 
     31-- 
     32-- Name: metric_tag_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:  
     33-- 
     34 
     35ALTER TABLE ONLY metric_tag 
     36    ADD CONSTRAINT metric_tag_pkey PRIMARY KEY (sid, metric_name); 
     37 
     38 
     39-- 
     40-- Name: trig_update_tsvector_from_metric_tag; Type: TRIGGER; Schema: noit; Owner: reconnoiter 
     41-- 
     42 
     43CREATE TRIGGER update_metric_name_summary 
     44    AFTER INSERT OR UPDATE ON metric_tag 
     45    FOR EACH ROW 
     46    EXECUTE PROCEDURE update_mns_via_metric_tag(); 
     47 
     48 
     49-- 
     50-- Name: metric_tag_sid_fkey; Type: FK CONSTRAINT; Schema: noit; Owner: reconnoiter 
     51-- 
     52 
     53ALTER TABLE ONLY metric_tag 
     54    ADD CONSTRAINT metric_tag_sid_fkey FOREIGN KEY (sid) REFERENCES map_uuid_to_sid(sid); 
     55 
     56 
     57-- 
     58-- Name: metric_tag; Type: ACL; Schema: noit; Owner: reconnoiter 
     59-- 
     60 
     61REVOKE ALL ON TABLE metric_tag FROM PUBLIC; 
     62REVOKE ALL ON TABLE metric_tag FROM reconnoiter; 
     63GRANT ALL ON TABLE metric_tag TO reconnoiter; 
     64GRANT ALL ON TABLE metric_tag TO prism; 
     65GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_tag TO stratcon; 
     66 
     67 
     68-- 
     69-- PostgreSQL database dump complete 
     70-- 
     71