Summary | New, faster datatree history migration script |
Queue | Horde Base |
Queue Version | 3.1.3 |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | |
Requester | josh (at) endries (dot) org |
Created | 12/05/2006 (6786 days ago) |
Due | |
Updated | 12/09/2006 (6782 days ago) |
Assigned | |
Resolved | 12/09/2006 (6782 days ago) |
Milestone | |
Patch | Yes |
State ⇒ Resolved
look yet to see why your script isn'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 "orphaned" datatree_ids that
should be purged from horde_datatree_attributes:
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's
attributes, only the object itself, oops!
Josh
State ⇒ Feedback
datatree elements that don't have any attributes. These rows don't
get deleted from the old history database, and I'm not sure if they
are supposed to or not. Here is a snip of these rows:
mysql> SELECT c.datatree_id, c.datatree_name, c.datatree_parents,
c.datatree_order FROM horde_datatree c WHERE c.group_uid =
'horde.history' order by datatree_id;
yet to see why your script isn'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 "orphaned" 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
datatree elements that don't have any attributes. These rows don't get
deleted from the old history database, and I'm not sure if they are
supposed to or not. Here is a snip of these rows:
mysql> SELECT c.datatree_id, c.datatree_name, c.datatree_parents,
c.datatree_order FROM horde_datatree c WHERE c.group_uid =
'horde.history' 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 |
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ New, faster datatree history migration script
Queue ⇒ Horde Base
New Attachment: datatree_history_migration.php
State ⇒ New
the old DB schema to the new, seprate-table schema. This version is
3000+ times faster for me, which makes me think I've missed some error
checks or cleanup or something, but AFAICT it does the same thing as
the current script. Here's my mailing original list post:
http://article.gmane.org/gmane.comp.horde.user/16366
Josh