<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>New, faster datatree history migration script</title> 
  <pubDate>Fri, 10 Apr 2026 11:02:31 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/4732</link> 
  <atom:link rel="self" type="application/rss+xml" title="New, faster datatree history migration script" href="https://bugs.horde.org/ticket/4732/rss" /> 
  <description>New, faster datatree history migration script</description> 
 
   
   
  <item> 
   <title>This is a new, faster script to migrate the history informat</title> 
   <description>This is a new, faster script to migrate the history information from the old DB schema to the new, seprate-table schema. This version is 3000+ times faster for me, which makes me think I&#039;ve missed some error checks or cleanup or something, but AFAICT it does the same thing as the current script. Here&#039;s my mailing original list post:



http://article.gmane.org/gmane.comp.horde.user/16366



Josh</description> 
   <pubDate>Tue, 05 Dec 2006 14:33:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/4732#t27016</link> 
  </item> 
   
  <item> 
   <title>One thing I&#039;ve noticed with some more testing is that I have</title> 
   <description>One thing I&#039;ve noticed with some more testing is that I have some datatree elements that don&#039;t have any attributes. These rows don&#039;t get deleted from the old history database, and I&#039;m not sure if they are supposed to or not. Here is a snip of these rows:



mysql&gt; SELECT c.datatree_id, c.datatree_name, c.datatree_parents, c.datatree_order FROM horde_datatree c WHERE c.group_uid = &#039;horde.history&#039; order by datatree_id;

+-------------+---------------------------------------------------------+------------------+----------------+

| datatree_id | datatree_name                                           | datatree_parents | datatree_order |

+-------------+---------------------------------------------------------+------------------+----------------+

|           4 | nag                                                     |                  |           NULL |

|          13 | imp                                                     |                  |           NULL |

|          17 | turba                                                   |                  |           NULL |

|          18 | localsql                                                | :17              |           NULL |

|         342 | horde                                                   |                  |           NULL |

|         343 | group                                                   | :342             |           NULL |

|        1285 | kronolith                                               |                  |           NULL |

|        3401 | user@foo.com                            | :17              |           NULL |

</description> 
   <pubDate>Tue, 05 Dec 2006 14:46:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/4732#t27017</link> 
  </item> 
   
  <item> 
   <title>&gt; One thing I&#039;ve noticed with some more testing is that I ha</title> 
   <description>&gt; One thing I&#039;ve noticed with some more testing is that I have some 

&gt; datatree elements that don&#039;t have any attributes. These rows don&#039;t 

&gt; get deleted from the old history database, and I&#039;m not sure if they 

&gt; are supposed to or not. Here is a snip of these rows:

&gt;

&gt; mysql&gt; SELECT c.datatree_id, c.datatree_name, c.datatree_parents, 

&gt; c.datatree_order FROM horde_datatree c WHERE c.group_uid = 

&gt; &#039;horde.history&#039; order by datatree_id;



Yes, those are probably parent entries. I haven&#039;t had a chance to look yet to see why your script isn&#039;t deleting them, but you should be able to kill everything with a group_uid of horde.history. Then you can use this snippet to find any &quot;orphaned&quot; datatree_ids that should be purged from horde_datatree_attributes:



SELECT DISTINCT da.datatree_id FROM horde_datatree_attributes da LEFT JOIN horde_datatree d ON da.datatree_id = d.datatree_id WHERE d.datatree_id IS NULL</description> 
   <pubDate>Tue, 05 Dec 2006 19:08:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/4732#t27029</link> 
  </item> 
   
  <item> 
   <title>&gt; Yes, those are probably parent entries. I haven&#039;t had a ch</title> 
   <description>&gt; Yes, those are probably parent entries. I haven&#039;t had a chance to 

&gt; look yet to see why your script isn&#039;t deleting them, but you should 

&gt; be able to kill everything with a group_uid of horde.history. Then 

&gt; you can use this snippet to find any &quot;orphaned&quot; datatree_ids that 

&gt; should be purged from horde_datatree_attributes:



The lines are not deleted because the delete statements are within the attribute loop, and since there are no attributes it never enters that loop. Moving the delete lines out of that loop (down three lines) should take care of it. They should probably be outside the loop anyway since they have nothing to do with the data tree object&#039;s attributes, only the object itself, oops!



Josh</description> 
   <pubDate>Tue, 05 Dec 2006 21:18:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/4732#t27030</link> 
  </item> 
   
  <item> 
   <title>Committed, thanks.</title> 
   <description>Committed, thanks.</description> 
   <pubDate>Sat, 09 Dec 2006 02:37:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/4732#t27236</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
