Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save natalia-chikina/7b78e469dabe4d6936b9f92e16bee29e to your computer and use it in GitHub Desktop.
Save natalia-chikina/7b78e469dabe4d6936b9f92e16bee29e to your computer and use it in GitHub Desktop.
CREATE TABLE IF NOT EXISTS streamingInventoryEvents(
locationType text,
locationId int,
cacheTime timestamp,
itemNumber text,
tag text,
time timestamp,
scanType int,
pieceTag text,
repId int,
ip text,
PRIMARY KEY((locationType, locationId), cacheTime, itemNumber, tag)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;
CREATE TABLE IF NOT EXISTS streamingInventories (
locationType text,
locationId int,
cacheTime timestamp,
PRIMARY KEY((locationType, locationId), cacheTime)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;
CREATE TABLE IF NOT EXISTS streamingInventoryProducts (
locationType text,
locationId int,
cacheTime timestamp,
itemNumber text,
productCount int,
PRIMARY KEY((locationType, locationId), cacheTime, itemNumber)) WITH CLUSTERING ORDER BY (cacheTime DESC) AND default_time_to_live = 259200 AND gc_grace_seconds = 86400;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment