· 9 years ago · Oct 05, 2016, 12:48 PM
1 CREATE TABLE IF NOT EXISTS streamingInventoryEvents(
2 locationType text,
3 locationId int,
4 cacheTime timestamp,
5 tag text,
6 time timestamp,
7 scanType int,
8 pieceTag text,
9 repId int,
10 ip text,
11 itemNumber text,
12 PRIMARY KEY((locationType, locationId), cacheTime, tag, itemNumber)) 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 streamingInventoriesProducts (
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;