aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md42
1 files changed, 5 insertions, 37 deletions
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<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