PacketFence - BTS - PacketFence
View Issue Details
0001285PacketFencecorepublic2011-09-27 15:472012-02-29 10:45
dwuelfrath 
dwuelfrath 
normalminorhave not tried
closedfixed 
 
3.0.23.0.2 
403f38fb5859a3572f58f372cc01826ed35a8bf9
0001285: add trigger or cascade to delete node_useragent when deleting a node
when we delete a node, we should also delete the mac-useragent binding.
No tags attached.
Issue History
2011-09-27 15:47dwuelfrathNew Issue
2011-10-05 14:10dwuelfrathNote Added: 0002314
2011-10-06 10:15obilodeauNote Added: 0002321
2011-10-07 10:03dwuelfrathmtn revision => 403f38fb5859a3572f58f372cc01826ed35a8bf9
2011-10-07 10:03dwuelfrathStatusnew => resolved
2011-10-07 10:03dwuelfrathResolutionopen => fixed
2011-10-07 10:03dwuelfrathFixed in Version => 3.0.1
2011-10-07 10:04dwuelfrathStatusresolved => assigned
2011-10-07 10:04dwuelfrathAssigned To => dwuelfrath
2011-10-07 10:04dwuelfrathStatusassigned => resolved
2011-10-11 16:29dwuelfrathNote Added: 0002334
2011-10-14 09:29obilodeauNote Added: 0002351
2011-10-14 10:19dwuelfrathNote Added: 0002355
2011-10-24 20:27obilodeauFixed in Version3.0.1 => 3.0.2
2011-10-24 20:27obilodeauNote Added: 0002394
2011-10-24 20:28obilodeauStatusresolved => closed
2011-10-24 20:28obilodeauTarget Version+1 => 3.0.2
2012-02-29 10:45obilodeauCategoryfeature => core

Notes
(0002314)
dwuelfrath   
2011-10-05 14:10   
Could look like this

--
-- Trigger to delete the node_useragent associated with a mac when deleting this mac from the node table
--

DROP TRIGGER IF EXISTS node_useragent_delete_trigger;
DELIMITER /
CREATE TRIGGER node_useragent_delete_trigger AFTER DELETE ON node
FOR EACH ROW
BEGIN
  DELETE FROM node_useragent WHERE mac = OLD.mac;
END /
DELIMITER ;
(0002321)
obilodeau   
2011-10-06 10:15   
yes, go for it
(0002334)
dwuelfrath   
2011-10-11 16:29   
modified in revision 8aa7974a4ae1c1d0bbcbd5d163e1efa5afbbf6f1
(0002351)
obilodeau   
2011-10-14 09:29   
Was the upgrade script tested, new db install tested and node deletion with cascade tested?
(0002355)
dwuelfrath   
2011-10-14 10:19   
Yes
(0002394)
obilodeau   
2011-10-24 20:27   
fix released in 3.0.2