{"action":"opened","number":266,"pull_request":{"url":"https://api.github.com/repos/noplay/python-mysql-replication/pulls/266","id":187673514,"html_url":"https://github.com/noplay/python-mysql-replication/pull/266","diff_url":"https://github.com/noplay/python-mysql-replication/pull/266.diff","patch_url":"https://github.com/noplay/python-mysql-replication/pull/266.patch","issue_url":"https://api.github.com/repos/noplay/python-mysql-replication/issues/266","number":266,"state":"open","locked":false,"title":"Update enum columns to support correct mysql enum indexing","user":{"login":"idop-alooma","id":30774026,"avatar_url":"https://avatars1.githubusercontent.com/u/30774026?v=4","gravatar_id":"","url":"https://api.github.com/users/idop-alooma","html_url":"https://github.com/idop-alooma","followers_url":"https://api.github.com/users/idop-alooma/followers","following_url":"https://api.github.com/users/idop-alooma/following{/other_user}","gists_url":"https://api.github.com/users/idop-alooma/gists{/gist_id}","starred_url":"https://api.github.com/users/idop-alooma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idop-alooma/subscriptions","organizations_url":"https://api.github.com/users/idop-alooma/orgs","repos_url":"https://api.github.com/users/idop-alooma/repos","events_url":"https://api.github.com/users/idop-alooma/events{/privacy}","received_events_url":"https://api.github.com/users/idop-alooma/received_events","type":"User","site_admin":false},"body":"When an enum value is stored in mysql it represent the index of the value (for `type=enum('a','b','c')` 1 represent 'a' ext... ) also, 0 represents the empty string. (when a wrong value is inserted to an enum column it will be saved as an empty string)\r\n\r\nWhen the package got an enum type it changed the indexes so ('a', 'b', 'c') will be mapped to (0, 1, 2), and it transformed the values from the bin-log accordingly. So value 1 (which is 'a' in this exemp) will be changed to 0 ect.. \r\nIf a value 0 was received it will be transformed to -1 which in python will be 'c'.\r\n\r\nTo solve this i added the empty string by default to an enum column metadata and removed the value transformation so that (0, 1, 2, 3)  will be mapped to -> ('', 'a', 'b', 'c')","created_at":"2018-05-13T14:41:06Z","updated_at":"2018-05-13T14:41:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/noplay/python-mysql-replication/pulls/266/commits","review_comments_url":"https://api.github.com/repos/noplay/python-mysql-replication/pulls/266/comments","review_comment_url":"https://api.github.com/repos/noplay/python-mysql-replication/pulls/comments{/number}","comments_url":"https://api.github.com/repos/noplay/python-mysql-replication/issues/266/comments","statuses_url":"https://api.github.com/repos/noplay/python-mysql-replication/statuses/af3c0dd82f0d72cf2ae72ccd860c6cd663f14606","head":{"label":"Aloomaio:update-ENUM-colums-to-support-correct-mysql-enum-indexing","ref":"update-ENUM-colums-to-support-correct-mysql-enum-indexing","sha":"af3c0dd82f0d72cf2ae72ccd860c6cd663f14606","user":{"login":"Aloomaio","id":7570177,"avatar_url":"https://avatars1.githubusercontent.com/u/7570177?v=4","gravatar_id":"","url":"https://api.github.com/users/Aloomaio","html_url":"https://github.com/Aloomaio","followers_url":"https://api.github.com/users/Aloomaio/followers","following_url":"https://api.github.com/users/Aloomaio/following{/other_user}","gists_url":"https://api.github.com/users/Aloomaio/gists{/gist_id}","starred_url":"https://api.github.com/users/Aloomaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aloomaio/subscriptions","organizations_url":"https://api.github.com/users/Aloomaio/orgs","repos_url":"https://api.github.com/users/Aloomaio/repos","events_url":"https://api.github.com/users/Aloomaio/events{/privacy}","received_events_url":"https://api.github.com/users/Aloomaio/received_events","type":"Organization","site_admin":false},"repo":{"id":94094006,"name":"python-mysql-replication","full_name":"Aloomaio/python-mysql-replication","owner":{"login":"Aloomaio","id":7570177,"avatar_url":"https://avatars1.githubusercontent.com/u/7570177?v=4","gravatar_id":"","url":"https://api.github.com/users/Aloomaio","html_url":"https://github.com/Aloomaio","followers_url":"https://api.github.com/users/Aloomaio/followers","following_url":"https://api.github.com/users/Aloomaio/following{/other_user}","gists_url":"https://api.github.com/users/Aloomaio/gists{/gist_id}","starred_url":"https://api.github.com/users/Aloomaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aloomaio/subscriptions","organizations_url":"https://api.github.com/users/Aloomaio/orgs","repos_url":"https://api.github.com/users/Aloomaio/repos","events_url":"https://api.github.com/users/Aloomaio/events{/privacy}","received_events_url":"https://api.github.com/users/Aloomaio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Aloomaio/python-mysql-replication","description":"Pure Python Implementation of MySQL replication protocol build on top of PyMYSQL","fork":true,"url":"https://api.github.com/repos/Aloomaio/python-mysql-replication","forks_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/forks","keys_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/teams","hooks_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/hooks","issue_events_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/issues/events{/number}","events_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/events","assignees_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/assignees{/user}","branches_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/branches{/branch}","tags_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/tags","blobs_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/git/refs{/sha}","trees_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/statuses/{sha}","languages_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/languages","stargazers_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/stargazers","contributors_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/contributors","subscribers_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/subscribers","subscription_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/subscription","commits_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/commits{/sha}","git_commits_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/git/commits{/sha}","comments_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/comments{/number}","issue_comment_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/issues/comments{/number}","contents_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/contents/{+path}","compare_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/merges","archive_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/downloads","issues_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/issues{/number}","pulls_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/pulls{/number}","milestones_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/milestones{/number}","notifications_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/labels{/name}","releases_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/releases{/id}","deployments_url":"https://api.github.com/repos/Aloomaio/python-mysql-replication/deployments","created_at":"2017-06-12T12:31:03Z","updated_at":"2018-05-01T08:34:37Z","pushed_at":"2018-05-13T13:03:01Z","git_url":"git://github.com/Aloomaio/python-mysql-replication.git","ssh_url":"git@github.com:Aloomaio/python-mysql-replication.git","clone_url":"https://github.com/Aloomaio/python-mysql-replication.git","svn_url":"https://github.com/Aloomaio/python-mysql-replication","homepage":null,"size":596,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"noplay:master","ref":"master","sha":"5068e51e8f9ae602ab085f74a164b1937712a4ba","user":{"login":"noplay","id":345437,"avatar_url":"https://avatars1.githubusercontent.com/u/345437?v=4","gravatar_id":"","url":"https://api.github.com/users/noplay","html_url":"https://github.com/noplay","followers_url":"https://api.github.com/users/noplay/followers","following_url":"https://api.github.com/users/noplay/following{/other_user}","gists_url":"https://api.github.com/users/noplay/gists{/gist_id}","starred_url":"https://api.github.com/users/noplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noplay/subscriptions","organizations_url":"https://api.github.com/users/noplay/orgs","repos_url":"https://api.github.com/users/noplay/repos","events_url":"https://api.github.com/users/noplay/events{/privacy}","received_events_url":"https://api.github.com/users/noplay/received_events","type":"User","site_admin":false},"repo":{"id":5819063,"name":"python-mysql-replication","full_name":"noplay/python-mysql-replication","owner":{"login":"noplay","id":345437,"avatar_url":"https://avatars1.githubusercontent.com/u/345437?v=4","gravatar_id":"","url":"https://api.github.com/users/noplay","html_url":"https://github.com/noplay","followers_url":"https://api.github.com/users/noplay/followers","following_url":"https://api.github.com/users/noplay/following{/other_user}","gists_url":"https://api.github.com/users/noplay/gists{/gist_id}","starred_url":"https://api.github.com/users/noplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noplay/subscriptions","organizations_url":"https://api.github.com/users/noplay/orgs","repos_url":"https://api.github.com/users/noplay/repos","events_url":"https://api.github.com/users/noplay/events{/privacy}","received_events_url":"https://api.github.com/users/noplay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noplay/python-mysql-replication","description":"Pure Python Implementation of MySQL replication protocol build on top of PyMYSQL","fork":false,"url":"https://api.github.com/repos/noplay/python-mysql-replication","forks_url":"https://api.github.com/repos/noplay/python-mysql-replication/forks","keys_url":"https://api.github.com/repos/noplay/python-mysql-replication/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noplay/python-mysql-replication/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noplay/python-mysql-replication/teams","hooks_url":"https://api.github.com/repos/noplay/python-mysql-replication/hooks","issue_events_url":"https://api.github.com/repos/noplay/python-mysql-replication/issues/events{/number}","events_url":"https://api.github.com/repos/noplay/python-mysql-replication/events","assignees_url":"https://api.github.com/repos/noplay/python-mysql-replication/assignees{/user}","branches_url":"https://api.github.com/repos/noplay/python-mysql-replication/branches{/branch}","tags_url":"https://api.github.com/repos/noplay/python-mysql-replication/tags","blobs_url":"https://api.github.com/repos/noplay/python-mysql-replication/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noplay/python-mysql-replication/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noplay/python-mysql-replication/git/refs{/sha}","trees_url":"https://api.github.com/repos/noplay/python-mysql-replication/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noplay/python-mysql-replication/statuses/{sha}","languages_url":"https://api.github.com/repos/noplay/python-mysql-replication/languages","stargazers_url":"https://api.github.com/repos/noplay/python-mysql-replication/stargazers","contributors_url":"https://api.github.com/repos/noplay/python-mysql-replication/contributors","subscribers_url":"https://api.github.com/repos/noplay/python-mysql-replication/subscribers","subscription_url":"https://api.github.com/repos/noplay/python-mysql-replication/subscription","commits_url":"https://api.github.com/repos/noplay/python-mysql-replication/commits{/sha}","git_commits_url":"https://api.github.com/repos/noplay/python-mysql-replication/git/commits{/sha}","comments_url":"https://api.github.com/repos/noplay/python-mysql-replication/comments{/number}","issue_comment_url":"https://api.github.com/repos/noplay/python-mysql-replication/issues/comments{/number}","contents_url":"https://api.github.com/repos/noplay/python-mysql-replication/contents/{+path}","compare_url":"https://api.github.com/repos/noplay/python-mysql-replication/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noplay/python-mysql-replication/merges","archive_url":"https://api.github.com/repos/noplay/python-mysql-replication/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noplay/python-mysql-replication/downloads","issues_url":"https://api.github.com/repos/noplay/python-mysql-replication/issues{/number}","pulls_url":"https://api.github.com/repos/noplay/python-mysql-replication/pulls{/number}","milestones_url":"https://api.github.com/repos/noplay/python-mysql-replication/milestones{/number}","notifications_url":"https://api.github.com/repos/noplay/python-mysql-replication/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noplay/python-mysql-replication/labels{/name}","releases_url":"https://api.github.com/repos/noplay/python-mysql-replication/releases{/id}","deployments_url":"https://api.github.com/repos/noplay/python-mysql-replication/deployments","created_at":"2012-09-15T09:39:08Z","updated_at":"2018-05-11T22:56:20Z","pushed_at":"2018-05-10T07:53:47Z","git_url":"git://github.com/noplay/python-mysql-replication.git","ssh_url":"git@github.com:noplay/python-mysql-replication.git","clone_url":"https://github.com/noplay/python-mysql-replication.git","svn_url":"https://github.com/noplay/python-mysql-replication","homepage":null,"size":587,"stargazers_count":1069,"watchers_count":1069,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":324,"mirror_url":null,"archived":false,"open_issues_count":45,"license":null,"forks":324,"open_issues":45,"watchers":1069,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/noplay/python-mysql-replication/pulls/266"},"html":{"href":"https://github.com/noplay/python-mysql-replication/pull/266"},"issue":{"href":"https://api.github.com/repos/noplay/python-mysql-replication/issues/266"},"comments":{"href":"https://api.github.com/repos/noplay/python-mysql-replication/issues/266/comments"},"review_comments":{"href":"https://api.github.com/repos/noplay/python-mysql-replication/pulls/266/comments"},"review_comment":{"href":"https://api.github.com/repos/noplay/python-mysql-replication/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/noplay/python-mysql-replication/pulls/266/commits"},"statuses":{"href":"https://api.github.com/repos/noplay/python-mysql-replication/statuses/af3c0dd82f0d72cf2ae72ccd860c6cd663f14606"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":9,"additions":14,"deletions":4,"changed_files":3}}
{"actor":{"display_login":"idop-alooma"}}