Martin Betak has posted comments on this change. Change subject: backend: Add HostDev passthrough support ......................................................................
Patch Set 3: (3 comments) http://gerrit.ovirt.org/#/c/35892/3/packaging/dbscripts/upgrade/03_06_0590_add_host_device_table.sql File packaging/dbscripts/upgrade/03_06_0590_add_host_device_table.sql: Line 1: CREATE TABLE host_device ( Line 2: host_id UUID NOT NULL, Line 3: device_name VARCHAR(255) NOT NULL, Line 4: parent_device_name VARCHAR(255) NOT NULL, > please remove redundant TAB Done Line 5: capability VARCHAR(32) NOT NULL, Line 6: iommu_group INTEGER NOT NULL, Line 7: product_name VARCHAR(255), Line 8: product_id VARCHAR(255), Line 14: ALTER TABLE ONLY host_device Line 15: ADD CONSTRAINT host_device_pk PRIMARY KEY (host_id, device_name); Line 16: Line 17: ALTER TABLE ONLY host_device Line 18: ADD CONSTRAINT fk_host_device_parent_name FOREIGN KEY (host_id, parent_device_name) REFERENCES host_device(host_id, device_name); > Don't you need here to CASCADE on delete ??? Not sure how to maintain this consistency, since the device tree can regroup, devices can be added/removed on each host refresh. Perhaps best to leave the logic to engine. Line 19: Line 20: ALTER TABLE ONLY host_device Line 17: ALTER TABLE ONLY host_device Line 18: ADD CONSTRAINT fk_host_device_parent_name FOREIGN KEY (host_id, parent_device_name) REFERENCES host_device(host_id, device_name); Line 19: Line 20: ALTER TABLE ONLY host_device Line 21: ADD CONSTRAINT fk_host_device_vm_id FOREIGN KEY (vm_id) REFERENCES vm_static(vm_guid); > Don't you need here to CASCADE on delete ??? Yes, thank you, this should be ON DELETE SET NULL -- To view, visit http://gerrit.ovirt.org/35892 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5575c0db797d7d04339c4b309bb4325e853ffed Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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