Eli Mesika has uploaded a new change for review.

Change subject: core: adding missing default to a non-null column
......................................................................

core: adding missing default to a non-null column

This patch fixes an issue in event_subscriber table that was added a
notification_method column which does not allow nulls.

If the table has any records before the upgrade, this will fail since
the existing records will have NULL for the new added column.

Change-Id: Id3c7ce30c32b9b38f08ff6c8c0eb8bfa02cf5066
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1072867
Signed-off-by: Eli Mesika <[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/76/25376/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..b5ac919 100644
--- a/packaging/dbscripts/upgrade/03_05_0050_event_notification_methods.sql
+++ b/packaging/dbscripts/upgrade/03_05_0050_event_notification_methods.sql
@@ -3,7 +3,7 @@
 DROP TABLE event_notification_methods ;
 
 -- save EventNotificationMethod as string with constraint.
-ALTER TABLE event_subscriber ADD COLUMN notification_method CHARACTER 
VARYING(32)
+ALTER TABLE event_subscriber ADD COLUMN notification_method CHARACTER 
VARYING(32) DEFAULT 'EMAIL'
   CHECK (notification_method IN ('EMAIL', 'SNMP_TRAP'));
 ALTER TABLE event_subscriber DROP CONSTRAINT pk_event_subscriber;
 ALTER TABLE event_subscriber


-- 
To view, visit http://gerrit.ovirt.org/25376
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3c7ce30c32b9b38f08ff6c8c0eb8bfa02cf5066
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to