{"action":"opened","issue":{"url":"https://api.github.com/repos/mybbgroup/MyBB_Thank-you-like-plugin/issues/194","repository_url":"https://api.github.com/repos/mybbgroup/MyBB_Thank-you-like-plugin","labels_url":"https://api.github.com/repos/mybbgroup/MyBB_Thank-you-like-plugin/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/mybbgroup/MyBB_Thank-you-like-plugin/issues/194/comments","events_url":"https://api.github.com/repos/mybbgroup/MyBB_Thank-you-like-plugin/issues/194/events","html_url":"https://github.com/mybbgroup/MyBB_Thank-you-like-plugin/issues/194","id":343398989,"node_id":"MDU6SXNzdWUzNDMzOTg5ODk=","number":194,"title":"Do we need the tyl_tnumtyls column in the threads table?","user":{"login":"lairdshaw","id":3241722,"node_id":"MDQ6VXNlcjMyNDE3MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/3241722?v=4","gravatar_id":"","url":"https://api.github.com/users/lairdshaw","html_url":"https://github.com/lairdshaw","followers_url":"https://api.github.com/users/lairdshaw/followers","following_url":"https://api.github.com/users/lairdshaw/following{/other_user}","gists_url":"https://api.github.com/users/lairdshaw/gists{/gist_id}","starred_url":"https://api.github.com/users/lairdshaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lairdshaw/subscriptions","organizations_url":"https://api.github.com/users/lairdshaw/orgs","repos_url":"https://api.github.com/users/lairdshaw/repos","events_url":"https://api.github.com/users/lairdshaw/events{/privacy}","received_events_url":"https://api.github.com/users/lairdshaw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-22T11:37:00Z","updated_at":"2018-07-22T11:37:00Z","closed_at":null,"author_association":"COLLABORATOR","body":"Unless I'm missing something, the only time this column is used (as opposed to being set/updated) is in thankyoulike_delete_thread(), to check whether the deleted thread has any tyls. The only reason I can see to perform this check is for efficiency, but that seems like a poor reason: threads are only rarely deleted, and the efficiency savings are in any case very minor, and possibly outweighed by all of the calculations and updates that have to be performed to keep this column's value accurate.\r\n\r\nDropping this column and any code associated with it would reduce complexity and the possibility of forgetting to take it into account. I *did* fail to take it into account in commit 8b22b79b5e9fca12c2e243305a7cd1101d3945c2 which fixed #147: Likes/Thanks are not merged upon User ID merge, so even if we decide not to drop the column, we'll need to fix tyl_user_users_merge_commit() to take it into account."}}
{"actor":{"display_login":"lairdshaw"}}