I'm in the first few days of Talkgg's life. I've racked up over 100 posts on the forum with a handful of members. Today I screwed up big time though. I am working on an algorithm that uses multiple factors to quantify the quality of a user. I don't want to give it all away, but it uses a lot of ratios, division and multiplication to come up with a number that represents user quality. It does this by taking multiple entries in each user's database row, using the algorithm and outputting the entry to the table.
Here's where I messed up. My algorithm worked, but I wanted to add a couple factors in. I had done all of this in PHPMyAdmin using a View in the DB. I deleted the View because I thought to myself "I can just make a new View later when I fine tune the last factors I want included in the algorithm." Well..Deleting a View in PHPMyAdmin also deletes corresponding tables. I lost the entire User table.
All of a sudden there was no Admin account, and no actual user accounts on the forum. Posts have names attached, but when you click on a Member it gives the error that the member did not exist. Ut oh!
It was much worst than it sounds because I had to leave for work in 5 minutes, so I knew my forum would be shutdown for 7+ hours before I'd even get a chance to fix it.
How I fixed it - I had no database backup yet because it's the first few days and I didn't think I'd make a common sense mistake like I did...I must have just blanked on the fact that the whole User table would be deleted.
I still have a lot to fix though... I have to do 1 more Header change, 1 more Footer change, set up all the Warning System reasons again, reconfigure a few more plugins and do some other stuff on the backend.
So...big issue, only took around 3 hours to fix it all though. It was a pain in the ass because PHPMyAdmin was getting cached so I couldn't access the new DB for a bit. I think it took so long because I wanted to make sure I got everything right. I could have done it smarter and shaved off 30-45 minutes, but oh well.
Here's where I messed up. My algorithm worked, but I wanted to add a couple factors in. I had done all of this in PHPMyAdmin using a View in the DB. I deleted the View because I thought to myself "I can just make a new View later when I fine tune the last factors I want included in the algorithm." Well..Deleting a View in PHPMyAdmin also deletes corresponding tables. I lost the entire User table.
All of a sudden there was no Admin account, and no actual user accounts on the forum. Posts have names attached, but when you click on a Member it gives the error that the member did not exist. Ut oh!
It was much worst than it sounds because I had to leave for work in 5 minutes, so I knew my forum would be shutdown for 7+ hours before I'd even get a chance to fix it.
How I fixed it - I had no database backup yet because it's the first few days and I didn't think I'd make a common sense mistake like I did...I must have just blanked on the fact that the whole User table would be deleted.
- Install MyBB again
- Merge Old DB (old DB had everything except user info) with New DB
- Create new user accounts manually for all of the members
- Go into the Posts/Threads tables and edit all the UID on the posts/threads to match the newly made user account's IDs.
- In hindsight I could have just altered the new UIDs to match the old UIDs on posts/threads instead of altering each individual post/thread ID to new UIDs...Would have saved about 30 minutes, but oh well.
- Redid all the template changes, including post icons, forum icons, and index changes.
I still have a lot to fix though... I have to do 1 more Header change, 1 more Footer change, set up all the Warning System reasons again, reconfigure a few more plugins and do some other stuff on the backend.
So...big issue, only took around 3 hours to fix it all though. It was a pain in the ass because PHPMyAdmin was getting cached so I couldn't access the new DB for a bit. I think it took so long because I wanted to make sure I got everything right. I could have done it smarter and shaved off 30-45 minutes, but oh well.







