Alona Kaplan has posted comments on this change.

Change subject: core: Add fk constraint on vm_interface_statistics
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/38170/2/packaging/dbscripts/upgrade/03_06_0930_add_delete_contraint_vm_interface_statistics.sql
File 
packaging/dbscripts/upgrade/03_06_0930_add_delete_contraint_vm_interface_statistics.sql:

Line 1: SELECT fn_db_create_constraint('vm_interface', 
'fk_vm_interface_statistics_vm_interface', 'FOREIGN KEY (id) REFERENCES 
vm_interface_statistics(id) ON DELETE CASCADE');
> I'd add a delete statement before this, just in case you have  a "dirty" en
1. I agree with Allon. Previous 'left overs' should be cleaned.
2. IIUC, removal of the vm_interface_statistics will cause removal of the 
vm_interface with the same id. You need the opposite-
SELECT fn_db_create_constraint('vm_interface_statistics', 
'fk_vm_interface_statistics_vm_interface', 'FOREIGN KEY (id) REFERENCES 
vm_interface(id) ON DELETE CASCADE');


-- 
To view, visit https://gerrit.ovirt.org/38170
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I53cf2737ef91cf967c93990fcb237f6c4e12a8f8
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: [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

Reply via email to