Remove the Ideas Bot#105
Conversation
|
How is the perfomance of the migration? Do we need to plan maintenance on .com if we run it, or is it just a few seconds? Otherwise looks good to me :) |
|
@paul999 Plan for maintenance. There are 427 Ideas on dot com right now, so 427 records to update in topics and then in posts. But also before updating Ideas on dot com, should make sure to backup DB and recount user posts. So best to do it during maintenance, just in case. |
|
Well, restoring backups is not something we want :P. We should first test it somewhere locally (Preferbly on a .com backup) before deplyoing it. cc/ @DavidIQ |
|
I wouldn't expect this to run more than a minute. When you're saying to plan for maintenance what exactly are you referring to? Making an announcement? |
|
I just say plan for maintenance because there may be some time intensive database updates. |
|
Bump |
|
Working on getting a backup copy of the .com database so I can test this locally to see how this performs. |
|
@DavidIQ bump in the night |
|
| $topics[$row['topic_id']] = [ | ||
| 'topic_poster_id' => $row['idea_author'], | ||
| 'topic_poster_name' => $row['username'], | ||
| 'topic_poster_colour' => $row['user_colour'], |
There was a problem hiding this comment.
The username and user_colour come back as NULL when the user does not exist (deleted) and these target columns don't allow nulls. You'll need to determine if that's the case and handle accordingly, assigning empty strings to topic_poster_name and topic_poster_colour and you'll also need to set topic_poster_id to the ANONYMOUS constant value (looks like it's 1 in the constants file).
|
Updated |
|
@paul999 the migration took somewhere between 10-20 seconds to run. All went well. |
When this gets implemented on dot-com, I suggest:
Backup
ideas_ideas,postsandtopicstables firstAfterwards, run
Resynchronise post countsin the ACPCloses #100