This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow queuing emails without participant
- Loading branch information
1 parent
69614fa
commit b80f821
Showing
3 changed files
with
126 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
BEGIN; | ||
-- In some cases, we don't have a participant linked to emails | ||
ALTER TABLE email_queue ALTER COLUMN participant DROP NOT NULL; | ||
|
||
-- Email address to send emails to. If not provided, participant's primary email will be used. | ||
ALTER TABLE email_queue ADD COLUMN email_address text; | ||
|
||
ALTER TABLE email_queue ADD CONSTRAINT email_or_participant_required | ||
CHECK ((participant IS NOT NULL) OR (email_address IS NOT NULL)); | ||
END; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters