From 981ba5c5f30549dbd233fab1e52bb774fd3eebe1 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 4 Aug 2015 23:24:46 +0200 Subject: o Adding Trireme setup to support migrating the Cassandra schema. --- README.md | 42 +++++------------------------------------- 1 file changed, 5 insertions(+), 37 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5d39e63..4ff94fc 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,9 @@ -# Soil Moisture Schema +# Initialization Cassandra - CREATE TABLE sm_by_day ( - device text, - day text, - timestamp timestamp, - sensors list>>, - 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>>, - 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>>, - primary key( - (device, day), - timestamp - ) - ); + $ inv trireme.cassandra.migrate -- cgit v1.2.3