diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-08-04 23:24:46 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-08-04 23:24:46 +0200 |
commit | 981ba5c5f30549dbd233fab1e52bb774fd3eebe1 (patch) | |
tree | 8c01ebc93c0cdd6ad3ec57d387d9349df446e4c6 /README.md | |
parent | 6e43b92686a9d8bf476567113fbc21677338eb08 (diff) | |
download | mqtt-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 'README.md')
-rw-r--r-- | README.md | 42 |
1 files changed, 5 insertions, 37 deletions
@@ -1,41 +1,9 @@ -# Soil Moisture Schema +# Initialization Cassandra - CREATE TABLE sm_by_day ( - device text, - day text, - timestamp timestamp, - sensors list<frozen<tuple<int, int>>>, - PRIMARY KEY ( - (device, day), - timestamp - ) - ); +This creates the `soil_moisture` schema and `migrations` table for Trireme. -# Raw Schema + $ cqlsh -f init.cql - CREATE TABLE raw_record ( - day text, - timestamp timestamp, - records list<frozen<tuple<text, text>>>, - PRIMARY KEY ( - (day), - timestamp - ) - ); +# Update Cassandra with new migrations -# Create Schema - - $ bin/cqlsh - cqlsh> create keyspace soil_moisture WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; - cqlsh> use soil_moisture; - cqlsh:soil_moisture> - create table sm_by_day( - device text, - day text, - timestamp timestamp, - sensors list<frozen<tuple<int, int>>>, - primary key( - (device, day), - timestamp - ) - ); + $ inv trireme.cassandra.migrate |