Roy Golan has posted comments on this change.

Change subject: core: add template version fields to vm and template
......................................................................


Patch Set 8:

(2 comments)

your call on versioning.
still bear in mind that using numbers we can easily achieve the same with int 
instead of Integer and with checks that looks like (v == LATEST) instead of (v 
== null) which is clearer.

http://gerrit.ovirt.org/#/c/22736/8/packaging/dbscripts/upgrade/03_04_0480_add_template_version_to_vm_static.sql
File 
packaging/dbscripts/upgrade/03_04_0480_add_template_version_to_vm_static.sql:

Line 1: select fn_db_add_column('vm_static', 'template_version_number', 
'INTEGER DEFAULT NULL');
> regarding naming: it was template_version before, but since we have templat
well of of course not naked -1. we will make them constants somewhere public
so UI,REST can use it too. 

if (getVm().getTemplateVersionNumber == TemplateVersion.LATEST) {
    updateVersion()
}

1 as base template is odd to me. I think its more natural to have the first 
version as 1 and the base as 0.
Line 2: select fn_db_add_column('vm_static', 'template_version_name', 
'varchar(40) DEFAULT NULL');
Line 3: -- make all existing vms and templates have version 1
Line 4: update vm_static set template_version_number=1;
Line 5: -- update base template for all templates


Line 1: select fn_db_add_column('vm_static', 'template_version_number', 
'INTEGER DEFAULT NULL');
Line 2: select fn_db_add_column('vm_static', 'template_version_name', 
'varchar(40) DEFAULT NULL');
> because user can already have this as an existing template name
I don't see where's the problem yet. a can do for name exist no?
 he can still change it doens't he.
Line 3: -- make all existing vms and templates have version 1
Line 4: update vm_static set template_version_number=1;
Line 5: -- update base template for all templates


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I08f13eee5609525880a92fc81c9fd3cb1d2ba62d
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to