Hi everybody,
we're currently testing an update of our DAViCal server from 0.9.7.6 to
offical 0.9.9
But I think there might be missing database relationship between the table
principal and group_member.
Why do we think so?
Because if you delete a group (via the web interface) it does delete
the group from the DB table "principal" but the group members to the no
longer available group still remain in table "group_member".
So I added the following foreign keys:
---------------------------------------------------------------------------
ALTER TABLE group_member
ADD CONSTRAINT fk_principal_group FOREIGN KEY (group_id)
REFERENCES principal (principal_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE group_member
ADD CONSTRAINT fk_principal_member FOREIGN KEY (member_id)
REFERENCES principal (principal_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE;
---------------------------------------------------------------------------
After doing that, deleting a group includes deleting its members - good ;-)
So I assume this is a bug?!
regards,
Matthias
HELPING HEADS for Hard- and Software
-------------------------------------------------------------------------
Fuer Ihre Projekte entwickeln wir massgeschneiderte Loesungen - schnell,
flexibel und direkt vor Ort. Unser eingespieltes Team an erfahrenen Hard-
und Software-Spezialisten unterstuetzt Sie dort, wo Sie uns brauchen.
--------------------------------------------------------------------------
SysDesign GmbH
Saentisstrasse 25
D-88079 Kressbronn am Bodensee
Geschaeftsfuehrer: Franz Kleiner
Handelsregister: Ulm 632138
--------------------------------------------------------------------------
we're currently testing an update of our DAViCal server from 0.9.7.6 to
offical 0.9.9
But I think there might be missing database relationship between the table
principal and group_member.
Why do we think so?
Because if you delete a group (via the web interface) it does delete
the group from the DB table "principal" but the group members to the no
longer available group still remain in table "group_member".
So I added the following foreign keys:
---------------------------------------------------------------------------
ALTER TABLE group_member
ADD CONSTRAINT fk_principal_group FOREIGN KEY (group_id)
REFERENCES principal (principal_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE group_member
ADD CONSTRAINT fk_principal_member FOREIGN KEY (member_id)
REFERENCES principal (principal_id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE;
---------------------------------------------------------------------------
After doing that, deleting a group includes deleting its members - good ;-)
So I assume this is a bug?!
regards,
Matthias
HELPING HEADS for Hard- and Software
-------------------------------------------------------------------------
Fuer Ihre Projekte entwickeln wir massgeschneiderte Loesungen - schnell,
flexibel und direkt vor Ort. Unser eingespieltes Team an erfahrenen Hard-
und Software-Spezialisten unterstuetzt Sie dort, wo Sie uns brauchen.
--------------------------------------------------------------------------
SysDesign GmbH
Saentisstrasse 25
D-88079 Kressbronn am Bodensee
Geschaeftsfuehrer: Franz Kleiner
Handelsregister: Ulm 632138
--------------------------------------------------------------------------