Changeset bd7ae6bdfb27483bdc6fab6971aa4dfd1beb52d3

Show
Ignore:
Timestamp:
10/23/09 17:48:45 (4 years ago)
Author:
Robert Treat <robert@omniti.com>
git-committer:
Robert Treat <robert@omniti.com> 1256320125 +0000
git-parent:

[19dac6033d54cc711d3e1bb1c511829b74c7fe15]

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

synch rollup tables with desired reality

Files:

Legend:

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

    r77e875d rbd7ae6b  
    4141 
    4242-- 
    43 -- Name: metric_numeric_rollup_20m_rollup_time_idx; Type: INDEX; Schema: noit; Owner: reconnoiter; Tablespace:  
    44 -- 
    45  
    46 CREATE INDEX metric_numeric_rollup_20m_rollup_time_idx ON metric_numeric_rollup_20m USING btree (date_hour(rollup_time)); 
    47  
    48  
    49 -- 
    5043-- Name: metric_numeric_rollup_20m; Type: ACL; Schema: noit; Owner: reconnoiter 
    5144-- 
    5245 
    5346REVOKE ALL ON TABLE metric_numeric_rollup_20m FROM PUBLIC; 
    54 REVOKE ALL ON TABLE metric_numeric_rollup_20m FROM reconnoiter; 
    55 GRANT ALL ON TABLE metric_numeric_rollup_20m TO reconnoiter; 
    5647GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_numeric_rollup_20m TO stratcon; 
    5748GRANT SELECT ON TABLE metric_numeric_rollup_20m TO prism; 
  • sql/tables/noit.metric_numeric_rollup_60m.sql

    r77e875d rbd7ae6b  
    1717 
    1818-- 
    19 -- Name: metric_numeric_rollup_60m; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:  
     19-- Name: metric_numeric_rollup_1hour; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:  
    2020-- 
    2121 
    22 CREATE TABLE metric_numeric_rollup_60m
     22CREATE TABLE metric_numeric_rollup_1hour
    2323    sid integer NOT NULL, 
    2424    name text NOT NULL, 
     
    3030 
    3131 
    32 ALTER TABLE noit.metric_numeric_rollup_60m OWNER TO reconnoiter; 
     32ALTER TABLE noit.metric_numeric_rollup_1hour OWNER TO reconnoiter; 
    3333 
    3434-- 
    35 -- Name: metric_numeric_rollup_60m_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:  
     35-- Name: metric_numeric_rollup_1hour_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:  
    3636-- 
    3737 
    38 ALTER TABLE ONLY metric_numeric_rollup_60m 
    39     ADD CONSTRAINT metric_numeric_rollup_60m_pkey PRIMARY KEY (rollup_time, sid, name); 
     38ALTER TABLE ONLY metric_numeric_rollup_1hour 
     39    ADD CONSTRAINT metric_numeric_rollup_1hour_pkey PRIMARY KEY (rollup_time, sid, name); 
    4040 
    4141 
    4242-- 
    43 -- Name: metric_numeric_rollup_60m; Type: ACL; Schema: noit; Owner: reconnoiter 
     43-- Name: metric_numeric_rollup_1hour; Type: ACL; Schema: noit; Owner: reconnoiter 
    4444-- 
    4545 
    46 REVOKE ALL ON TABLE metric_numeric_rollup_60m FROM PUBLIC; 
    47 REVOKE ALL ON TABLE metric_numeric_rollup_60m FROM reconnoiter; 
    48 GRANT ALL ON TABLE metric_numeric_rollup_60m TO reconnoiter; 
    49 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_numeric_rollup_60m TO stratcon; 
    50 GRANT SELECT ON TABLE metric_numeric_rollup_60m TO prism; 
     46REVOKE ALL ON TABLE metric_numeric_rollup_1hour FROM PUBLIC; 
     47REVOKE ALL ON TABLE metric_numeric_rollup_1hour FROM reconnoiter; 
     48GRANT ALL ON TABLE metric_numeric_rollup_1hour TO reconnoiter; 
     49GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_numeric_rollup_1hour TO stratcon; 
     50GRANT SELECT ON TABLE metric_numeric_rollup_1hour TO prism; 
    5151 
    5252 
  • sql/tables/noit.metric_numeric_rollup_config.sql

    r19dac60 rbd7ae6b  
     1 
     2set search_path=noit,pg_catalog; 
     3 
     4-- 
    15-- Name: metric_numeric_rollup_config; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:  
    26-- 
    37 
    4 CREATE TABLE noit.metric_numeric_rollup_config ( 
     8CREATE TABLE metric_numeric_rollup_config ( 
    59    rollup text NOT NULL, 
    610    seconds integer NOT NULL, 
     
    1014 
    1115 
    12 ALTER TABLE noit.metric_numeric_rollup_config OWNER TO reconnoiter; 
     16ALTER TABLE metric_numeric_rollup_config OWNER TO reconnoiter; 
    1317 
    1418-- 
     
    1620-- 
    1721 
    18 INSERT INTO noit.metric_numeric_rollup_config VALUES ('5m', 300, NULL, 86400); 
    19 INSERT INTO noit.metric_numeric_rollup_config VALUES ('20m', 1200, '5m', 604800); 
    20 INSERT INTO noit.metric_numeric_rollup_config VALUES ('30m', 1800, '5m', 1209600); 
    21 INSERT INTO noit.metric_numeric_rollup_config VALUES ('1h', 3600, '30m', 2592000); 
    22 INSERT INTO noit.metric_numeric_rollup_config VALUES ('4h', 14400, '1h', 7862400); 
    23 INSERT INTO noit.metric_numeric_rollup_config VALUES ('1d', 86400, '4h', 31536000); 
     22INSERT INTO metric_numeric_rollup_config VALUES ('5m', 300, NULL, 86400); 
     23INSERT INTO metric_numeric_rollup_config VALUES ('20m', 1200, '5m', 604800); 
     24INSERT INTO metric_numeric_rollup_config VALUES ('30m', 1800, '5m', 1209600); 
     25INSERT INTO metric_numeric_rollup_config VALUES ('1hour', 3600, '30m', 2592000); 
     26INSERT INTO metric_numeric_rollup_config VALUES ('4hour', 14400, '1hour', 7862400); 
     27INSERT INTO metric_numeric_rollup_config VALUES ('1day', 86400, '4hour', 31536000); 
    2428 
    2529-- 
     
    2731-- 
    2832 
    29 ALTER TABLE ONLY noit.metric_numeric_rollup_config 
     33ALTER TABLE ONLY metric_numeric_rollup_config 
    3034    ADD CONSTRAINT metric_numeric_rollup_config_pkey PRIMARY KEY (rollup); 
    31  
    3235 
    3336-- 
     
    3538-- 
    3639 
    37 ALTER TABLE ONLY noit.metric_numeric_rollup_config 
    38     ADD CONSTRAINT metric_numeric_rollup_config_dependent_on_fkey FOREIGN KEY (dependent_on) REFERENCES noit.metric_numeric_rollup_config(rollup); 
     40ALTER TABLE ONLY metric_numeric_rollup_config 
     41    ADD CONSTRAINT metric_numeric_rollup_config_dependent_on_fkey FOREIGN KEY (dependent_on) REFERENCES metric_numeric_rollup_config(rollup); 
    3942 
    4043