Skip to content

Instantly share code, notes, and snippets.

@jdubois
Created April 21, 2015 09:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdubois/76317d3d31beb197e54a to your computer and use it in GitHub Desktop.
Save jdubois/76317d3d31beb197e54a to your computer and use it in GitHub Desktop.
Cassandra JHipster CQL script for the User table
CREATE TABLE IF NOT EXISTS user (
id text,
login text,
password text,
firstname text,
lastname text,
email text,
activated boolean,
lang_key text,
activation_key text,
authorities set<text>,
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS user_by_login (
login text,
id text,
PRIMARY KEY(login, id)
);
CREATE TABLE IF NOT EXISTS user_by_email (
email text,
id text,
PRIMARY KEY(email, id)
);
CREATE TABLE IF NOT EXISTS user_by_activation_key (
activation_key text,
id text,
PRIMARY KEY(activation_key, id)
);
CREATE TABLE IF NOT EXISTS activation_key_by_creation_date (
creation_date timeuuid,
activation_key text,
PRIMARY KEY(creation_date, activation_key)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment