2010/4/15 Juha Heinanen <jh(a)tutpro.com>om>:
Iñaki Baz Castillo writes:
Hi, 'ip_addr' and 'mask' columns
(in 'address' table) should be a
composite UNIQUE key as it doesn't make sense to have two entries
sharing both values (the module would always take the first one).
This would requiere a change in the DB schema. Opinions?
i think that grp should also be included in the unique key.
Humm, I don't think so. Forget now the "port" field (which should also
be considered for the composite key):
Imagine two entries with same "ip_addr" and "mask" but differnt
"grp".
This would be valid as you suggest, but it doesn't make sense as the
permissions module would get just the first entry and extract the
"grp" from it. This is, the composite key columns must be those used
by the search condition ("ip_addr", "mask" and "port").
--
Iñaki Baz Castillo
<ibc(a)aliax.net>