Created
May 26, 2023 08:35
-
-
Save tjarvstrand/3c31c39f1aab0f5c1f8e3d39b1e08483 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS event_user_invitation ( | |
event_id TEXT NOT NULL REFERENCES event(id) ON DELETE CASCADE, | |
invited_user_id TEXT NOT NULL REFERENCES user$(id) ON DELETE CASCADE, | |
invited_group_id TEXT REFERENCES friend_group(id) ON DELETE CASCADE, | |
inviting_user_id TEXT NOT NULL REFERENCES user$(id) ON DELETE CASCADE, | |
created_at TIMESTAMP NOT NULL, | |
PRIMARY KEY (event_id, invited_user_id, inviting_user_id) | |
); | |
CREATE TABLE IF NOT EXISTS event_group_invitation ( | |
event_id TEXT NOT NULL REFERENCES event(id) ON DELETE CASCADE, | |
invited_group_id TEXT REFERENCES friend_group(id) ON DELETE CASCADE, | |
created_at TIMESTAMP NOT NULL, | |
PRIMARY KEY (event_id, invited_group_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment