-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from GenerateNU/rest_of_schema
Rest of schema
- Loading branch information
Showing
2 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
backend/internal/supabase/migrations/20240922222648_add_rest_of_schema.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
create table if not exists follower ( | ||
follower_id uuid not null references "user"(id), | ||
followee_id uuid not null references "user"(id), | ||
primary key (follower_id, followee_id) | ||
); | ||
|
||
create table if not exists playlist ( | ||
id serial primary key, | ||
title text not null, | ||
user_id uuid not null references "user"(id), | ||
bio text, | ||
cover_photo text | ||
); | ||
|
||
create table if not exists playlist_track ( | ||
playlist_id bigint not null references playlist(id), | ||
track_id bigint not null references track(id), | ||
primary key (playlist_id, track_id) | ||
); | ||
|
||
create table if not exists user_auth ( | ||
id serial primary key, | ||
user_id uuid not null references "user"(id), | ||
refresh_token text not null, | ||
access_token text not null | ||
); | ||
|
||
create table if not exists user_review_vote ( | ||
user_id uuid not null references "user"(id), | ||
review_id integer not null references review(id), | ||
upvote boolean not null, | ||
primary key (user_id, review_id) | ||
); |
This file contains 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