Frank Kobzik has uploaded a new change for review. Change subject: core: adjusts default_display_type ......................................................................
core: adjusts default_display_type This patch sets default_display_type of vm/template so that it corresponds to video device of this vm/template. This change is needed since DisplayType enum (and its semantics) was changed. Change-Id: I63b268619065fef638349d95bef22bc0ce34c9b8 Signed-off-by: Frantisek Kobzik <fkob...@redhat.com> --- A packaging/dbscripts/upgrade/03_06_0710_adjust_default_display_type.sql 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/09/36609/1 diff --git a/packaging/dbscripts/upgrade/03_06_0710_adjust_default_display_type.sql b/packaging/dbscripts/upgrade/03_06_0710_adjust_default_display_type.sql new file mode 100644 index 0000000..4e28665 --- /dev/null +++ b/packaging/dbscripts/upgrade/03_06_0710_adjust_default_display_type.sql @@ -0,0 +1,16 @@ +-- Update that adjusts vm_static.default_display_type enumeration +-- according to corresponding video device of vm/template. + +create function d2n2(varchar) returns integer as $$ +begin + if $1 = 'vga' then return 0; end if; + if $1 = 'cirrus' then return 1 ; end if; + return 2; -- qxl is default +end; $$ language plpgsql; + +update vm_static +set default_display_type = d2n2(device) +from vm_device +where vm_device.vm_id = vm_static.vm_guid and vm_device.type = 'video'; + +drop function d2n2(varchar) ; -- To view, visit http://gerrit.ovirt.org/36609 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63b268619065fef638349d95bef22bc0ce34c9b8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <fkob...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches