source: advanced_constraints.sql@ 5b2dd1d

main
Last change on this file since 5b2dd1d was 3679996, checked in by GitHub <noreply@…>, 5 weeks ago

Add files via upload

  • Property mode set to 100644
File size: 408 bytes
Line 
1ALTER TABLE event_rsvp
2ADD CONSTRAINT chk_rsvp_status
3CHECK (status IN ('accepted', 'declined', 'pending'));
4
5ALTER TABLE attendance
6ADD CONSTRAINT chk_attendance_status
7CHECK (status IN ('attending', 'absent'));
8
9ALTER TABLE event_rsvp
10ADD CONSTRAINT uq_guest_event_rsvp
11UNIQUE (guest_id, event_id);
12
13ALTER TABLE attendance
14ADD CONSTRAINT uq_guest_event_attendance
15UNIQUE (guest_id, event_id);
Note: See TracBrowser for help on using the repository browser.