CREATE KEYSPACE streamkeyspace WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 3};
CREATE TABLE IF NOT EXISTS streamkeyspace.user (
id uuid PRIMARY KEY,
created_time timestamp,
username text,
password text,
email text
);
INSERT INTO streamkeyspace.user (id,username,password,email,created_time) VALUES (uuid(),'admin','admin123','[email protected]',dateof(now());
CREATE TABLE IF NOT EXISTS streamkeyspace.file (
id uuid,
name text,
content_length bigint,
userid uuid,
PRIMARY KEY(id,userid)
);
CREATE TABLE IF NOT EXISTS streamkeyspace.file_chunk (
chunk_id bigint,
file_id uuid,
content blob,
PRIMARY KEY(chunk_id,file_id)
);