|
|
#38811
01/02/2004 9:45 PM
|
Joined: Jan 2004
Posts: 5
stranger
|
|
stranger
Joined: Jan 2004
Posts: 5 |
Would there be a problem if I changed the U_Number of a user to an unused number in w3t_Users? What happened was I switched from another forum package and started using the UBB.threads database for my existing Photopost gallery. The problem was I had users who were previously registered in the Photopost user database and I wanted to retain all the images. However, now there's a user-id conflict with some of the previously registered Photopost users with users in the new UBB database. I need to do some fancy swizzling to put everything back in sync and this will involve some shuffling of U_numbers. I want to make sure this won't cause any undesirable side effects before I go off and change the database.
Yes, I have backups! <img src="https://www.ubbcentral.com/boards/images/graemlins/cool.gif" alt="" />
-K
|
|
|
#38812
01/02/2004 10:26 PM
|
Joined: Jun 2006
Posts: 742
enthusiast
|
|
enthusiast
Joined: Jun 2006
Posts: 742 |
Careful. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" /> This could cause big problems.
Here are some tips.
- No user can be user #1 - user#1 has to be the "placholder" user for anonymous users and users who have been deleted. - If you change the usernumber in the w3t_Users table - you must change the occurance of that number in EVERY other table, because if the different scripts try to join different tables by user number, and they don't match up, then stuff will simply not appear. So if you're not careful, whole forums, or posts could disappear. So if you change a user number in the user table, be sure to search and make the same adjustment in EVERY table that has user numbers. (Which is most of them).
For that reason, I would not recommend doing it as it could be quite complex. But if you've got backups and have a pretty decent understanding of MySQL and can understand how everything is joined together by user numbers, if you update every table that uses it, then you should be fine. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />
Just so that you understand the risks involved. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />
|
|
|
#38813
01/02/2004 10:43 PM
|
Joined: Jun 2006
Posts: 346
enthusiast
|
|
enthusiast
Joined: Jun 2006
Posts: 346 |
You might want to talk to Michael P. at Photopost.com and discuss a possible import from the pp database to the threads databse (users only).
|
|
|
#38814
01/03/2004 12:14 AM
|
Joined: Jan 2004
Posts: 5
stranger
|
|
stranger
Joined: Jan 2004
Posts: 5 |
Thanks Josh. So far I've identified the following tables that seem to re-use the U_Number...
Table---------------Columns w3t_Last--------------L_Uid w3t_Messages-----M_Uid, M_sender w3t_Moderators----M_Uid w3t_Posts------------B_PosterId, B_LastPosterId
I'm unsure about these...
Table---------------Columns w3t_Online----------O_Uid w3t_Ratings---------R_What w3t_Subscribe------S_Uid
It shouldn't be hard to catch all the necessary tables with a simple script. However I want to be sure I've identified all the fields I need to change. Can you take a look at this and see if I've missed anything? Many thanks.
I'll try it out on one user and if I break the database, I can always reverse the changes.
Photopost OTOH, is another matter...
[] So if you change a user number in the user table, be sure to search and make the same adjustment in EVERY table that has user numbers. (Which is most of them). [/]
|
|
|
#38815
01/03/2004 12:16 AM
|
Joined: Jun 2006
Posts: 346
enthusiast
|
|
enthusiast
Joined: Jun 2006
Posts: 346 |
Prolly best to take this over to www.threadsdev.com, we can no longer offer editing help for the files etc.. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />
|
|
|
#38816
01/03/2004 12:39 AM
|
Joined: Jun 2006
Posts: 742
enthusiast
|
|
enthusiast
Joined: Jun 2006
Posts: 742 |
He's not editing any of the scripts. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />
Assuming you're running 6.4.
[]
Table---------------Columns w3t_Last--------------L_Uid [:"red"]Correct[/] w3t_Messages-----M_Uid, M_sender [:"red"]Correct[/] w3t_Moderators----M_Uid [:"red"]Correct[/] w3t_Posts------------B_PosterId, B_LastPosterId [:"red"]Correct[/]
I'm unsure about these...
Table---------------Columns w3t_Online----------O_Uid [:"red"]The online table is temp data so no worries here[/] w3t_Ratings---------R_What [:"red"]Yes R_What holds a user number IF R_Type = u. If R_Type = t then it's a thread rating as opposed to a user rating.[/] w3t_Subscribe------S_Uid [:"red"]Correct[/] [/]
Additional tables
w3t_AddressBook --- Add_Owner,Add_Member w3t_Banned ---- B_Uid w3t_Boards --- Bo_Posterid (the last poster usernumber in each forum) w3t_Calendar --- C_Owner w3t_DisplayNames (if there's no display name changes in the queue, don't worry about this table) w3t_Favorites --- F_Owner w3t_Moderators --- Mod_Uid w3t_PollVotes --- P_Voter
Also the U_Ignored field in the w3t_Users table will contain a list of any user numbers that particular user is ignoring.
I *think* that covers it. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />
|
|
|
#38817
01/03/2004 12:51 AM
|
Joined: Jun 2006
Posts: 346
enthusiast
|
|
enthusiast
Joined: Jun 2006
Posts: 346 |
[]He's not editing any of the scripts. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />
Assuming you're running 6.4.
[/]
Never assume <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />
|
|
|
#38818
01/03/2004 1:14 AM
|
Joined: Jun 2006
Posts: 742
enthusiast
|
|
enthusiast
Joined: Jun 2006
Posts: 742 |
Who are you talking to? <img src="https://www.ubbcentral.com/boards/images/graemlins/confused.gif" alt="" />
|
|
|
#38819
01/03/2004 2:37 AM
|
Joined: Jan 2004
Posts: 5
stranger
|
|
stranger
Joined: Jan 2004
Posts: 5 |
Josh, As we say in Hawaii - mahalo nui loa! (thank you very much). Now that I'm armed with enough info to wreak havoc, I'll whip up a shell script to build the needed sql statements and give `er a try. Wish me godspeed John Glenn! <img src="https://www.ubbcentral.com/boards/images/graemlins/grin.gif" alt="" />
-K
P.S. Yes, 6.4
|
|
|
#38820
01/03/2004 2:44 AM
|
Joined: Jun 2006
Posts: 742
enthusiast
|
|
enthusiast
Joined: Jun 2006
Posts: 742 |
Good luck. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />
|
|
|
|
0 members (),
166
guests, and
137
robots. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
|
|
|