Skip to content

Instantly share code, notes, and snippets.

@xmorave2
Created November 19, 2019 06:32
Show Gist options
  • Save xmorave2/7c3c022d5c9d7e316921e0100fb16cce to your computer and use it in GitHub Desktop.
Save xmorave2/7c3c022d5c9d7e316921e0100fb16cce to your computer and use it in GitHub Desktop.
Notifies on holds from another partrons
INSERT INTO borrower_message_preferences (borrowernumber, message_attribute_id, days_in_advance) SELECT borrowernumber, 7 AS message_attribute_id, NULL AS days_in_advance FROM borrowers;
INSERT INTO borrower_message_transport_preferences (borrower_message_preference_id, message_transport_type) SELECT borrower_message_preference_id, "email" AS message_transport_type FROM borrower_message_preferences WHERE message_attribute_id = 7 AND borrowernumber IS NOT NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment