push_subscriptions table
The push_subscriptions table in the Reddit Clone Database Schema schema has 4 columns, with 1 foreign key to user_devices.
Push preference is per device per type, because a person reasonably wants reply pings on their phone and nothing on their desktop.
Columns (4)
| Column | Type | Constraints | Description |
|---|---|---|---|
| device_id | uuid | not null, references user_devices.id | |
| notification_type | notification_type | not null | |
| is_enabled | boolean | not null | |
| updated_at | timestamptz | not null |
Relationships
push_subscriptions.device_idreferencesuser_devices.id