Maor Lipchuk has uploaded a new change for review. Change subject: core: Add fk constraint on vm_interface_statistics ......................................................................
core: Add fk constraint on vm_interface_statistics Once a network interface is being removed from the Data Base its corresponding statistics data in _vm_interface_statistics should be removed also. Currently, when a Storge Domain is being detached from a Data Center, all the data related to it is being removed from the Data Base. Since there is no foreign key between vm_interface and vm_interface_statistics which does cascade delete there are left overs which are left in vm_interface_statistics although the vm_interface was deleted. Change-Id: I53cf2737ef91cf967c93990fcb237f6c4e12a8f8 Bug-Url: https://bugzilla.redhat.com/?????? Signed-off-by: Maor Lipchuk <[email protected]> --- A packaging/dbscripts/upgrade/03_06_0930_add_delete_contraint_vm_interface_statistics.sql 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/38170/1 diff --git a/packaging/dbscripts/upgrade/03_06_0930_add_delete_contraint_vm_interface_statistics.sql b/packaging/dbscripts/upgrade/03_06_0930_add_delete_contraint_vm_interface_statistics.sql new file mode 100644 index 0000000..3c2671a --- /dev/null +++ b/packaging/dbscripts/upgrade/03_06_0930_add_delete_contraint_vm_interface_statistics.sql @@ -0,0 +1,2 @@ +SELECT fn_db_create_constraint('vm_interface', 'fk_vm_interface_statistics_vm_interface', 'FOREIGN KEY (id) REFERENCES vm_interface_statistics(id) ON DELETE CASCADE'); + -- To view, visit https://gerrit.ovirt.org/38170 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53cf2737ef91cf967c93990fcb237f6c4e12a8f8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
