Moti Asayag has posted comments on this change.
Change subject: tools: Refactor model and DB mapping of
eventNotificationMethods.
......................................................................
Patch Set 16:
(2 comments)
....................................................
File packaging/dbscripts/upgrade/03_04_0340_event_notification_methods.sql
Line 1: -- DROP event_notification_methods
please note that 03_04_0340 is already taken.
Line 2: ALTER TABLE event_subscriber DROP CONSTRAINT
fk_event_subscriber_event_notification_methods;
Line 3: DROP TABLE event_notification_methods ;
Line 4:
Line 5: -- save EventNotificationMethod as enum.
Line 6: CREATE TYPE event_notification_method AS ENUM ('EMAIL');
Line 7: ALTER TABLE event_subscriber ADD COLUMN notification_method
event_notification_method;
Line 8: ALTER TABLE event_subscriber DROP CONSTRAINT pk_event_subscriber;
Line 9: ALTER TABLE event_subscriber
Line 10: ADD CONSTRAINT pk_event_subscriber PRIMARY KEY (subscriber_id,
event_up_name, notification_method, tag_name);
does notification_method, tag_name should be part of the pk ?
it makes sense that a subscriber should be subscribed to a single event.
I assume there shouldn't be an option for him to subscribe to the same event
twice, therefore subscriber_id, event_up_name should be enough to identify a
unique record on that table.
Unless we intend to store in that take 2 records per subscriber for each event
by the notification method ? (which makes only the tag_name redundant)
Line 11: ALTER TABLE event_subscriber DROP COLUMN method_id;
Line 12:
--
To view, visit http://gerrit.ovirt.org/22135
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8b71c4e78bbdca3d02d2ac4ef419b9d3d7d58761
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches