<div dir="ltr"><br><div>My vote is for the intermediate table to store the MAC address and enforce unique constraint on the mac address field.  No need of extra triggers when it can be solved in a simple way and no need to add extra code to handle it.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 20, 2015 at 5:08 AM, William Stevenson <span dir="ltr"><<a href="mailto:yhvh2000@gmail.com" target="_blank">yhvh2000@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
In reference to comments on a patchset[1], port/portgroup addresses<br>
should be unique. Please also see the irc log[1] which includes<br>
earlier discussion regarding rationale.<br>
<br>
Q: How can we enforce this uniqueness across tables?<br>
<br>
<br>
[1] <a href="https://review.openstack.org/#/c/206232/26/ironic/db/sqlalchemy/alembic/versions/5ea1b0d310e_added_port_group_table_and_altered_ports.py" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/206232/26/ironic/db/sqlalchemy/alembic/versions/5ea1b0d310e_added_port_group_table_and_altered_ports.py</a><br>
[2] <a href="http://ix.io/luF/irc" rel="noreferrer" target="_blank">http://ix.io/luF/irc</a><br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div>