Skip to content

Commit

Permalink
feat(shared): create an uniq index on TalkSessionWithSpeakers table.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardPaligot committed Jan 2, 2024
1 parent f775879 commit 1138313
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ event_id TEXT NOT NULL,
FOREIGN KEY (speaker_id) REFERENCES Speaker(id),
FOREIGN KEY (talk_id) REFERENCES TalkSession(id)
);

CREATE UNIQUE INDEX TalkSessionWithSpeakersIndex ON TalkSessionWithSpeakers(speaker_id, talk_id, event_id);
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ FOREIGN KEY (speaker_id) REFERENCES Speaker(id),
FOREIGN KEY (talk_id) REFERENCES TalkSession(id)
);

CREATE UNIQUE INDEX TalkSessionWithSpeakersIndex ON TalkSessionWithSpeakers(speaker_id, talk_id, event_id);

selectSessions:
SELECT Session.id, Session.order_, Session.event_id, Session.date, Session.start_time, Session.end_time, Session.room, Session.is_favorite,
Session.talk_id, TalkSession.title, TalkSession.abstract, TalkSession.level, TalkSession.language, TalkSession.slide_url, TalkSession.replay_url, TalkSession.open_feedback_url,
Expand Down

0 comments on commit 1138313

Please sign in to comment.