Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | public.gen_random_uuid() |
|
|
||||||
| enabled | bool | 1 | true |
|
|
Whether notifications are enabled for a notification preference category. |
|||||
| channel | enum_Notification_preference_channel | 2147483647 | null |
|
|
The channel the notification is sent from. |
|||||
| UserId | uuid | 2147483647 | null |
|
|
Foreign key, refers to User. |
|||||
| CategoryId | uuid | 2147483647 | null |
|
|
Foreign key, refers to NotificationPreferenceCategory. |
|||||
| createdAt | timestamptz | 35,6 | now() |
|
|
||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| UserNotificationPreferences_pkey | Primary key | Asc | id |
| UserNotificationPreferences_channel_UserId_CategoryId_composite | Must be unique | Asc/Asc/Asc | channel + UserId + CategoryId |
| UserNotificationPreferences_UserId_CategoryId_idx | Performance | Asc/Asc | UserId + CategoryId |

