From 73d272ffe8954b3169901eda74428bad3d2740fe Mon Sep 17 00:00:00 2001
From: Trygve Laugstøl <trygvis@inamo.no>
Date: Mon, 19 Oct 2015 21:53:49 +0200
Subject: o Adding aggregation tables. o Adding migration scripts for the
 schema.

---
 .../sqls/20151019162254-by-hour-and-minute-up.sql     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 migrations/sqls/20151019162254-by-hour-and-minute-up.sql

(limited to 'migrations/sqls/20151019162254-by-hour-and-minute-up.sql')

diff --git a/migrations/sqls/20151019162254-by-hour-and-minute-up.sql b/migrations/sqls/20151019162254-by-hour-and-minute-up.sql
new file mode 100644
index 0000000..8e212f4
--- /dev/null
+++ b/migrations/sqls/20151019162254-by-hour-and-minute-up.sql
@@ -0,0 +1,19 @@
+DROP TABLE IF EXISTS value_by_hour;
+CREATE TABLE value_by_hour (
+  property  BIGINT    NOT NULL,
+  timestamp TIMESTAMP NOT NULL,
+  count     NUMERIC   NOT NULL,
+  max       NUMERIC   NOT NULL,
+  min       NUMERIC   NOT NULL,
+  avg       NUMERIC   NOT NULL
+);
+
+DROP TABLE IF EXISTS value_by_minute;
+CREATE TABLE value_by_minute (
+  property  BIGINT    NOT NULL,
+  timestamp TIMESTAMP NOT NULL,
+  count     NUMERIC   NOT NULL,
+  max       NUMERIC   NOT NULL,
+  min       NUMERIC   NOT NULL,
+  avg       NUMERIC   NOT NULL
+);
-- 
cgit v1.2.3

