Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
7 registered (Ruben, Dunny, Bjab, Gizmo, Bert, Mike L, Yarpâ„¢), 21 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 14904
Top Posters (30 Days)
Ruben 65
SD 57
Gizmo 48
gliderdad 33
Dunny 21
driv 18
dbremer 16
Iann128 16
Stan 15
Mark S 13
Latest Photos
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Gizzo Marx
Topic Options
#239169 - 09/01/10 03:43 PM Merge User , really sufficient ?
smallufo Offline
enthusiast
Registered: 06/05/06
Posts: 263
Loc: Taiwan
In domergeuser2.php , the merge user script only update these tables :
ubbt_USER_PROFILE
ubbt_TOPICS
ubbt_POSTS
ubbt_FILES
ubbt_POLL_DATA
ubbt_PRIVATE_MESSAGE_TOPICS
ubbt_PRIVATE_MESSAGE_POSTS
ubbt_PRIVATE_MESSAGE_USERS
ubbt_SHOUT_BOX

delete :
ubbt_USERS
ubbt_USER_PROFILE
ubbt_USER_DATA
ubbt_USER_GROUPS
ubbt_FORUM_LAST_VISIT


But there are other tables that contains USER_ID that is not cleaned / modified , such as :
ubbt_BANNED_USERS (delete ?)
ubbt_CALENDAR_EVENTS (delete ?)
ubbt_MODERATORS (delete ?)
ubbt_RATINGS where RATING_TYPE = 'u' (delete ?)
ubbt_WATCH_LISTS where WATCH_TYPE = 'u' (delete ?)
... (maybe there're still others missed here)

Is it ok to leave these 'zombie' data ?
When migrating to 8.0 , will there be a 'clean-up' script that scans the whole integrity of the db ?
_________________________

English is not my native language.
I try my best to express my thought precisely.
I hope you understand what I mean.
If any misunderstanding results from culture gaps , I apologize first.
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#239170 - 09/01/10 03:48 PM Re: Merge User , really sufficient ? [Re: smallufo]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4268
Loc: Lutz,FL
Good question.
We currently have issues over the different versions with orphaned data/files.
It would be nice to have something to clean them all up.
Including file attachments and gallery items.
_________________________
Blue Man Group
Top
#239185 - 09/01/10 08:47 PM Re: Merge User , really sufficient ? [Re: Ruben]
smallufo Offline
enthusiast
Registered: 06/05/06
Posts: 263
Loc: Taiwan
Are these codes sufficient ? (groovy codes , but easy to understand)

Code:

db.execute """
  delete from ubbt_BANNED_USERS
  where USER_ID = $fromUser
"""

db.execute """
  delete from ubbt_CALENDAR_EVENTS
  where USER_ID = $fromUser
"""

db.execute """
  delete from ubbt_RATINGS
  where RATING_RATER = $fromUser or ( RATING_TYPE = 'u' and RATING_TARGET = $fromUser)
"""

db.execute """
  delete from ubbt_CALENDAR_EVENTS
  where USER_ID = $fromUser
"""

db.execute """
  delete from ubbt_WATCH_LISTS
  where USER_ID = $fromUser or ( WATCH_TYPE = 'u' and WATCH_ID = $fromUser )
"""

_________________________

English is not my native language.
I try my best to express my thought precisely.
I hope you understand what I mean.
If any misunderstanding results from culture gaps , I apologize first.
Top
#239186 - 09/01/10 10:33 PM Re: Merge User , really sufficient ? [Re: smallufo]
SD Offline
Registered: 04/19/07
Posts: 4031
Loc: SoCal, USA
well, technically that works, but if you are merging a banned user into a non-banned one you might OR the ban state?

same idea for the other ones...

so YES, delete removes all traces of former, but doesn't truly then MERGE

you might think of UPDATE queries and REPLACE INTO queries if you truly want to merge..

in the end, your queries are good for a removal of the former self though smile
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top



Moderator:  AllenAyres, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Edit Post
by Bert
Today at 01:19 PM
A positive note
by SteveS
Yesterday at 09:36 PM
How to locate links to particular site if they are only used in images?
by Conrad
02/10/12 09:41 PM
Pictures not displaying
by Marker23
02/09/12 10:04 PM
Issue with logging out constantly
by Flanuva
02/09/12 07:05 PM
Forum Stats
10213 Members
36 Forums
33667 Topics
180917 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image