aboutsummaryrefslogtreecommitdiff
path: root/trireme/db
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-08-04 23:24:46 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-08-04 23:24:46 +0200
commit981ba5c5f30549dbd233fab1e52bb774fd3eebe1 (patch)
tree8c01ebc93c0cdd6ad3ec57d387d9349df446e4c6 /trireme/db
parent6e43b92686a9d8bf476567113fbc21677338eb08 (diff)
downloadmqtt-cassandra-bridge-981ba5c5f30549dbd233fab1e52bb774fd3eebe1.tar.gz
mqtt-cassandra-bridge-981ba5c5f30549dbd233fab1e52bb774fd3eebe1.tar.bz2
mqtt-cassandra-bridge-981ba5c5f30549dbd233fab1e52bb774fd3eebe1.tar.xz
mqtt-cassandra-bridge-981ba5c5f30549dbd233fab1e52bb774fd3eebe1.zip
o Adding Trireme setup to support migrating the Cassandra schema.
Diffstat (limited to 'trireme/db')
-rw-r--r--trireme/db/migrations/2015-08-04_0_sm_by_day.cql10
-rw-r--r--trireme/db/migrations/2015-08-04_1_raw_record.cql9
2 files changed, 19 insertions, 0 deletions
diff --git a/trireme/db/migrations/2015-08-04_0_sm_by_day.cql b/trireme/db/migrations/2015-08-04_0_sm_by_day.cql
new file mode 100644
index 0000000..776cd23
--- /dev/null
+++ b/trireme/db/migrations/2015-08-04_0_sm_by_day.cql
@@ -0,0 +1,10 @@
+CREATE TABLE sm_by_day (
+ device text,
+ day text,
+ timestamp timestamp,
+ sensors list<frozen<tuple<int, int>>>,
+ PRIMARY KEY (
+ (device, day),
+ timestamp
+ )
+);
diff --git a/trireme/db/migrations/2015-08-04_1_raw_record.cql b/trireme/db/migrations/2015-08-04_1_raw_record.cql
new file mode 100644
index 0000000..85c4ecb
--- /dev/null
+++ b/trireme/db/migrations/2015-08-04_1_raw_record.cql
@@ -0,0 +1,9 @@
+CREATE TABLE raw_record (
+ day text,
+ timestamp timestamp,
+ records list<frozen<tuple<text, text>>>,
+ PRIMARY KEY (
+ (day),
+ timestamp
+ )
+);