Created
August 9, 2011 23:44
-
-
Save mcrider/1135506 to your computer and use it in GitHub Desktop.
Proposed schema for notifciation mailing list schema
This file contains hidden or 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
<!-- | |
* | |
* TABLE notification_mail_list | |
* | |
--> | |
<table name="notification_mail_list"> | |
<field name="subscription_id" type="I8"> | |
<KEY /> | |
<AUTOINCREMENT/> | |
</field> | |
<field name="email" type="X"> | |
<NOTNULL/> | |
</field> | |
<field name="confirmed" type="I1"> | |
<NOTNULL/> | |
<DEFAULT VALUE="0"/> | |
</field> | |
<field name="context" type="I8"> | |
<NOTNULL/> | |
</field> | |
<descr>Stores subscriptions to the notification mailing list</descr> | |
</table> |
asmecher
commented
Aug 9, 2011
- subscription_id might cause confusion with subscriptions -- suggest notification_mail_list_id (little long but OK)
- Needs unique index on email and context, I think
- Might need a _settings table for this too, to store notification block / email settings. That would free up notification_settings to store only content attached to individual notifications.
I see your point about keeping notification_settings just for metadata for individual notifications, but those two things (blocked/emailed settings) are conceptually different than everything else. Maybe put them in a notification_options table? Or notification_subscription_settings?
That's what I mean by a _settings table to go with notification_mail_list. Or I might've missed your point...?
i'm just talking semantics. A table called notification_mail_list_settings shouldn't contain anything to do with blocked notifications or what notifications get emailed out to subscribed users. It would have to be called something else. Don't worry, I think we're probably on the same page at different paragraphs here..
OK, sounds good. Go for it!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment