· 9 years ago · Oct 05, 2016, 07:08 PM
1CREATE TABLE IF NOT EXISTS streamingInventoryEvents(
2 locationType text,
3 locationId int,
4 cacheTime timestamp,
5 itemNumber text,
6 tag text,
7 time timestamp,
8 scanType int,
9 pieceTag text,
10 repId int,
11 ip text,
12 PRIMARY KEY((locationType, locationId), cacheTime, itemNumber, tag)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;
13
14CREATE TABLE IF NOT EXISTS streamingInventories (
15 locationType text,
16 locationId int,
17 cacheTime timestamp,
18 PRIMARY KEY((locationType, locationId), cacheTime)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;
19
20CREATE TABLE IF NOT EXISTS streamingInventoryProducts (
21 locationType text,
22 locationId int,
23 cacheTime timestamp,
24 itemNumber text,
25 productCount int,
26 PRIMARY KEY((locationType, locationId), cacheTime, itemNumber)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;