Constraints

6 Foreign Key Constraints

Constraint Name Child Column Parent Column Delete Rule
ExpertRatings_expertUserId_fkey
ExpertRatings.expertUserId
Users.id
Cascade on delete
ExpertReviews_expertUserId_fkey
ExpertReviews.expertUserId
Users.id
Cascade on delete
PreviousLearnerPromotionNotifications_NotificationId_fkey
PreviousLearnerPromotionNotifications.NotificationId
Notifications.id
Cascade on delete
PreviousLearnerPromotionNotifications_expertClassId_fkey
PreviousLearnerPromotionNotifications.expertClassId
ExpertClasses.id
Restrict delete
PreviousLearnerPromotionNotifications_matchingExpertUserId_fkey
PreviousLearnerPromotionNotifications.matchingExpertUserId
Users.id
Restrict delete
PreviousLearnerPromotionNotifications_matchingCategoryId_fkey
PreviousLearnerPromotionNotifications.matchingCategoryId
ExpertClassCategories.id
Restrict delete

Check Constraints

Table Constraint Name Constraint
ExpertRatings ExpertRatings_finalRating_check ((("finalRating" >= 0.01) AND ("finalRating" <= (5)::numeric)))
ExpertRatings ExpertRatings_totalResponseCount_check (("totalResponseCount" >= 1))
PreviousLearnerPromotionNotifications expert_class_PreviousLearnerPromotionNotifications_matchingExpe (((("matchingExpertUserId" = NULL::uuid) AND ("matchingCategoryId" IS NOT NULL)) OR (("matchingCategoryId" = NULL::uuid) AND ("matchingExpertUserId" IS NOT NULL))))
PreviousLearnerPromotionNotifications PreviousLearnerPromotionNotification_daysBeforeClassStart_check ((("daysBeforeClassStart" = 2) OR ("daysBeforeClassStart" = 4) OR ("daysBeforeClassStart" = 8)))