Skip to content

Commit

Permalink
Issue #LR-716 chore: Added if not exists clause in cassandra query.
Browse files Browse the repository at this point in the history
  • Loading branch information
AmiableAnil committed Nov 10, 2023
1 parent 19f28f8 commit 5413b03
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE sunbird.user_roles(
CREATE TABLE IF NOT EXISTS sunbird.user_roles(
userid text,
role text,
scope text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ALTER TABLE sunbird.user ADD prevUsedPhone text;
ALTER TABLE sunbird.user ADD prevUsedEmail text;
CREATE TABLE sunbird.user_cert (id text,certId text,userId text,store map<text,text>,otherLink text,accessCode text,createdAt timestamp, updatedAt timestamp, PRIMARY KEY (id));
CREATE TABLE IF NOT EXISTS sunbird.user_cert (id text,certId text,userId text,store map<text,text>,otherLink text,accessCode text,createdAt timestamp, updatedAt timestamp, PRIMARY KEY (id));
CREATE INDEX inx_usrcert_user_id ON sunbird.user_cert(userId);
CREATE INDEX inx_usrcert_cert_id ON sunbird.user_cert(certId);

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ createdBy text,
lastUpdatedBy text,
PRIMARY KEY(templateId));

CREATE TABLE sunbird_notifications.notification_feed (
CREATE TABLE IF NOT EXISTS sunbird_notifications.notification_feed (
id text PRIMARY KEY,
category text,
createdby text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE test (
CREATE TABLE IF NOT EXISTS test (
space text,
key text,
value text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE contents (
CREATE TABLE IF NOT EXISTS contents (
id bigint PRIMARY KEY,
title text,
message text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE test1 (
CREATE TABLE IF NOT EXISTS test1 (
space text,
key text,
value text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CREATE TABLE contents (
CREATE TABLE IF NOT EXISTS contents (
id bigint PRIMARY KEY,
title text,
message text,
created timestamp
);

CREATE TABLE messages (
CREATE TABLE IF NOT EXISTS messages (
id bigint PRIMARY KEY,
contents_id bigint,
type int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE test1 (
CREATE TABLE IF NOT EXISTS test1 (
space text,
key text,
value text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CREATE TABLE contents (
CREATE TABLE IF NOT EXISTS contents (
id bigint PRIMARY KEY,
title text,
message text,
created timestamp
);

CREATE TABLE messages (
CREATE TABLE IF NOT EXISTS messages (
id bigint PRIMARY KEY,
contents_id bigint,
type int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE test1 (
CREATE TABLE IF NOT EXISTS test1 (
space text,
key text,
value text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CREATE TABLE contents (
CREATE TABLE IF NOT EXISTS contents (
id bigint PRIMARY KEY,
title text,
message text,
created timestamp
);

CREATE TABLE messages (
CREATE TABLE IF NOT EXISTS messages (
id bigint PRIMARY KEY,
contents_id bigint,
type int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE test1 (
CREATE TABLE IF NOT EXISTS test1 (
space text,
key text,
value text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CREATE TABLE contents (
CREATE TABLE IF NOT EXISTS contents (
id bigint PRIMARY KEY,
title text,
message text,
created timestamp
);

CREATE TABLE messages (
CREATE TABLE IF NOT EXISTS messages (
id bigint PRIMARY KEY,
contents_id bigint,
type int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE test (
CREATE TABLE IF NOT EXISTS test (
space text,
key text,
value text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE contents (
CREATE TABLE IF NOT EXISTS contents (
id bigint PRIMARY KEY,
title text,
message text,
Expand Down

0 comments on commit 5413b03

Please sign in to comment.