saved_searches table
The saved_searches table in the Reddit Clone Database Schema schema has 8 columns, keyed by id, with 2 foreign keys to users and subreddits.
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| user_id | uuid | not null, references users.id | |
| name | varchar(100) | not null | |
| query | varchar(500) | not null | |
| scope | search_scope | not null | |
| subreddit_id | uuid | references subreddits.id | |
| notify | boolean | not null | |
| created_at | timestamptz | not null |
Indexes (1)
(user_id, created_at)
Relationships
saved_searches.user_idreferencesusers.idsaved_searches.subreddit_idreferencessubreddits.id