mooli tayer has uploaded a new change for review. Change subject: tools: fix event_subscribers upgrade script. ......................................................................
tools: fix event_subscribers upgrade script. with out this fix, The script will fail on any user that has an event_subscriber record. The problem is creating a p_key with null values. Change-Id: I42813681562e1030a3c9a16bd091920189ce49ef Signed-off-by: Mooli Tayer <[email protected]> --- M packaging/dbscripts/upgrade/03_05_0050_event_notification_methods.sql 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/72/25372/1 diff --git a/packaging/dbscripts/upgrade/03_05_0050_event_notification_methods.sql b/packaging/dbscripts/upgrade/03_05_0050_event_notification_methods.sql index d515d92..9af64b4 100644 --- a/packaging/dbscripts/upgrade/03_05_0050_event_notification_methods.sql +++ b/packaging/dbscripts/upgrade/03_05_0050_event_notification_methods.sql @@ -5,12 +5,12 @@ -- save EventNotificationMethod as string with constraint. ALTER TABLE event_subscriber ADD COLUMN notification_method CHARACTER VARYING(32) CHECK (notification_method IN ('EMAIL', 'SNMP_TRAP')); +UPDATE event_subscriber SET notification_method = 'EMAIL'; ALTER TABLE event_subscriber DROP CONSTRAINT pk_event_subscriber; ALTER TABLE event_subscriber ADD CONSTRAINT pk_event_subscriber PRIMARY KEY (subscriber_id, event_up_name, notification_method, tag_name); ALTER TABLE event_subscriber DROP COLUMN method_id; -UPDATE event_subscriber SET notification_method = 'EMAIL'; ALTER TABLE event_subscriber ALTER notification_method SET NOT NULL; -- To view, visit http://gerrit.ovirt.org/25372 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42813681562e1030a3c9a16bd091920189ce49ef Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: mooli tayer <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
