{"action":"closed","number":182,"pull_request":{"url":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls/182","id":93950401,"html_url":"https://github.com/Cepave/open-falcon-backend/pull/182","diff_url":"https://github.com/Cepave/open-falcon-backend/pull/182.diff","patch_url":"https://github.com/Cepave/open-falcon-backend/pull/182.patch","issue_url":"https://api.github.com/repos/Cepave/open-falcon-backend/issues/182","number":182,"state":"closed","locked":false,"title":"[OWL-1242][scripts] add two columns in boss.hosts tables","user":{"login":"humorless","id":3061798,"avatar_url":"https://avatars.githubusercontent.com/u/3061798?v=3","gravatar_id":"","url":"https://api.github.com/users/humorless","html_url":"https://github.com/humorless","followers_url":"https://api.github.com/users/humorless/followers","following_url":"https://api.github.com/users/humorless/following{/other_user}","gists_url":"https://api.github.com/users/humorless/gists{/gist_id}","starred_url":"https://api.github.com/users/humorless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humorless/subscriptions","organizations_url":"https://api.github.com/users/humorless/orgs","repos_url":"https://api.github.com/users/humorless/repos","events_url":"https://api.github.com/users/humorless/events{/privacy}","received_events_url":"https://api.github.com/users/humorless/received_events","type":"User","site_admin":false},"body":"3.4.0 是進小版號。所以 db schema 的 change 要在這一版上。\r\n\r\n**How to verify**\r\n對比 patch 的結果，與直接新建的 db-schema 是否會一致。\r\nStep 1 建立一個 coss 資料庫，用全新的 boss database schema 來建立。\r\n```\r\ncd Cepave/open-falcon-backend/scripts/mysql/db_schema\r\ncat boss-db-schema.sql | sed -e \"s/boss/coss/g\" > ./coss-db-schema.sql\r\nmysql -h10.20.30.40 -uroot -ppassword < ./coss-db-schema.sql\r\n```\r\nStep 2 對 boss database 做 patch \r\n```\r\ncd Cepave/open-falcon-backend/scripts/mysql/dbpatch/change-log\r\nmysql -h10.20.30.40 -uroot -ppassword boss -e \"describe hosts;\"   #先看一次資料表\r\n./build_dbpatch.sh                  # 重新編繹 dbpatch 的 binary \r\n./patch_boss.sh                      # patching \r\nmysql -h10.20.30.40 -uroot -ppassword boss -e \"describe hosts;\"   #再看一次資料表。\r\n\r\n```\r\nStep 3 mysqldiff\r\n`mysqldiff --server1=root:password@10.20.30.40 boss.hosts:coss.hosts --difftype=sql -v`\r\n做為肉眼比對的參考。\r\n","created_at":"2016-11-16T11:44:44Z","updated_at":"2016-11-17T13:01:24Z","closed_at":"2016-11-17T13:01:24Z","merged_at":"2016-11-17T13:01:24Z","merge_commit_sha":"ea39f2e856552ac01d73f6fb08db358e5b667f03","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls/182/commits","review_comments_url":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls/182/comments","review_comment_url":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cepave/open-falcon-backend/issues/182/comments","statuses_url":"https://api.github.com/repos/Cepave/open-falcon-backend/statuses/5d88fa7f1691cea3a1b2d9c0acc47fd624fe0802","head":{"label":"humorless:OWL-1242","ref":"OWL-1242","sha":"5d88fa7f1691cea3a1b2d9c0acc47fd624fe0802","user":{"login":"humorless","id":3061798,"avatar_url":"https://avatars.githubusercontent.com/u/3061798?v=3","gravatar_id":"","url":"https://api.github.com/users/humorless","html_url":"https://github.com/humorless","followers_url":"https://api.github.com/users/humorless/followers","following_url":"https://api.github.com/users/humorless/following{/other_user}","gists_url":"https://api.github.com/users/humorless/gists{/gist_id}","starred_url":"https://api.github.com/users/humorless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humorless/subscriptions","organizations_url":"https://api.github.com/users/humorless/orgs","repos_url":"https://api.github.com/users/humorless/repos","events_url":"https://api.github.com/users/humorless/events{/privacy}","received_events_url":"https://api.github.com/users/humorless/received_events","type":"User","site_admin":false},"repo":{"id":62689117,"name":"open-falcon-backend","full_name":"humorless/open-falcon-backend","owner":{"login":"humorless","id":3061798,"avatar_url":"https://avatars.githubusercontent.com/u/3061798?v=3","gravatar_id":"","url":"https://api.github.com/users/humorless","html_url":"https://github.com/humorless","followers_url":"https://api.github.com/users/humorless/followers","following_url":"https://api.github.com/users/humorless/following{/other_user}","gists_url":"https://api.github.com/users/humorless/gists{/gist_id}","starred_url":"https://api.github.com/users/humorless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humorless/subscriptions","organizations_url":"https://api.github.com/users/humorless/orgs","repos_url":"https://api.github.com/users/humorless/repos","events_url":"https://api.github.com/users/humorless/events{/privacy}","received_events_url":"https://api.github.com/users/humorless/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/humorless/open-falcon-backend","description":null,"fork":true,"url":"https://api.github.com/repos/humorless/open-falcon-backend","forks_url":"https://api.github.com/repos/humorless/open-falcon-backend/forks","keys_url":"https://api.github.com/repos/humorless/open-falcon-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/humorless/open-falcon-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/humorless/open-falcon-backend/teams","hooks_url":"https://api.github.com/repos/humorless/open-falcon-backend/hooks","issue_events_url":"https://api.github.com/repos/humorless/open-falcon-backend/issues/events{/number}","events_url":"https://api.github.com/repos/humorless/open-falcon-backend/events","assignees_url":"https://api.github.com/repos/humorless/open-falcon-backend/assignees{/user}","branches_url":"https://api.github.com/repos/humorless/open-falcon-backend/branches{/branch}","tags_url":"https://api.github.com/repos/humorless/open-falcon-backend/tags","blobs_url":"https://api.github.com/repos/humorless/open-falcon-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/humorless/open-falcon-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/humorless/open-falcon-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/humorless/open-falcon-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/humorless/open-falcon-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/humorless/open-falcon-backend/languages","stargazers_url":"https://api.github.com/repos/humorless/open-falcon-backend/stargazers","contributors_url":"https://api.github.com/repos/humorless/open-falcon-backend/contributors","subscribers_url":"https://api.github.com/repos/humorless/open-falcon-backend/subscribers","subscription_url":"https://api.github.com/repos/humorless/open-falcon-backend/subscription","commits_url":"https://api.github.com/repos/humorless/open-falcon-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/humorless/open-falcon-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/humorless/open-falcon-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/humorless/open-falcon-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/humorless/open-falcon-backend/contents/{+path}","compare_url":"https://api.github.com/repos/humorless/open-falcon-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/humorless/open-falcon-backend/merges","archive_url":"https://api.github.com/repos/humorless/open-falcon-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/humorless/open-falcon-backend/downloads","issues_url":"https://api.github.com/repos/humorless/open-falcon-backend/issues{/number}","pulls_url":"https://api.github.com/repos/humorless/open-falcon-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/humorless/open-falcon-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/humorless/open-falcon-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/humorless/open-falcon-backend/labels{/name}","releases_url":"https://api.github.com/repos/humorless/open-falcon-backend/releases{/id}","deployments_url":"https://api.github.com/repos/humorless/open-falcon-backend/deployments","created_at":"2016-07-06T03:44:47Z","updated_at":"2016-07-06T03:44:49Z","pushed_at":"2016-11-16T11:41:19Z","git_url":"git://github.com/humorless/open-falcon-backend.git","ssh_url":"git@github.com:humorless/open-falcon-backend.git","clone_url":"https://github.com/humorless/open-falcon-backend.git","svn_url":"https://github.com/humorless/open-falcon-backend","homepage":null,"size":16919,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"Cepave:develop","ref":"develop","sha":"26c70ba36c7c68390b800b6c96c2f303c79777b0","user":{"login":"Cepave","id":12696914,"avatar_url":"https://avatars.githubusercontent.com/u/12696914?v=3","gravatar_id":"","url":"https://api.github.com/users/Cepave","html_url":"https://github.com/Cepave","followers_url":"https://api.github.com/users/Cepave/followers","following_url":"https://api.github.com/users/Cepave/following{/other_user}","gists_url":"https://api.github.com/users/Cepave/gists{/gist_id}","starred_url":"https://api.github.com/users/Cepave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cepave/subscriptions","organizations_url":"https://api.github.com/users/Cepave/orgs","repos_url":"https://api.github.com/users/Cepave/repos","events_url":"https://api.github.com/users/Cepave/events{/privacy}","received_events_url":"https://api.github.com/users/Cepave/received_events","type":"Organization","site_admin":false},"repo":{"id":55585417,"name":"open-falcon-backend","full_name":"Cepave/open-falcon-backend","owner":{"login":"Cepave","id":12696914,"avatar_url":"https://avatars.githubusercontent.com/u/12696914?v=3","gravatar_id":"","url":"https://api.github.com/users/Cepave","html_url":"https://github.com/Cepave","followers_url":"https://api.github.com/users/Cepave/followers","following_url":"https://api.github.com/users/Cepave/following{/other_user}","gists_url":"https://api.github.com/users/Cepave/gists{/gist_id}","starred_url":"https://api.github.com/users/Cepave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cepave/subscriptions","organizations_url":"https://api.github.com/users/Cepave/orgs","repos_url":"https://api.github.com/users/Cepave/repos","events_url":"https://api.github.com/users/Cepave/events{/privacy}","received_events_url":"https://api.github.com/users/Cepave/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cepave/open-falcon-backend","description":null,"fork":false,"url":"https://api.github.com/repos/Cepave/open-falcon-backend","forks_url":"https://api.github.com/repos/Cepave/open-falcon-backend/forks","keys_url":"https://api.github.com/repos/Cepave/open-falcon-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cepave/open-falcon-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cepave/open-falcon-backend/teams","hooks_url":"https://api.github.com/repos/Cepave/open-falcon-backend/hooks","issue_events_url":"https://api.github.com/repos/Cepave/open-falcon-backend/issues/events{/number}","events_url":"https://api.github.com/repos/Cepave/open-falcon-backend/events","assignees_url":"https://api.github.com/repos/Cepave/open-falcon-backend/assignees{/user}","branches_url":"https://api.github.com/repos/Cepave/open-falcon-backend/branches{/branch}","tags_url":"https://api.github.com/repos/Cepave/open-falcon-backend/tags","blobs_url":"https://api.github.com/repos/Cepave/open-falcon-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cepave/open-falcon-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cepave/open-falcon-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cepave/open-falcon-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cepave/open-falcon-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/Cepave/open-falcon-backend/languages","stargazers_url":"https://api.github.com/repos/Cepave/open-falcon-backend/stargazers","contributors_url":"https://api.github.com/repos/Cepave/open-falcon-backend/contributors","subscribers_url":"https://api.github.com/repos/Cepave/open-falcon-backend/subscribers","subscription_url":"https://api.github.com/repos/Cepave/open-falcon-backend/subscription","commits_url":"https://api.github.com/repos/Cepave/open-falcon-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cepave/open-falcon-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cepave/open-falcon-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cepave/open-falcon-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cepave/open-falcon-backend/contents/{+path}","compare_url":"https://api.github.com/repos/Cepave/open-falcon-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cepave/open-falcon-backend/merges","archive_url":"https://api.github.com/repos/Cepave/open-falcon-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cepave/open-falcon-backend/downloads","issues_url":"https://api.github.com/repos/Cepave/open-falcon-backend/issues{/number}","pulls_url":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/Cepave/open-falcon-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/Cepave/open-falcon-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cepave/open-falcon-backend/labels{/name}","releases_url":"https://api.github.com/repos/Cepave/open-falcon-backend/releases{/id}","deployments_url":"https://api.github.com/repos/Cepave/open-falcon-backend/deployments","created_at":"2016-04-06T07:37:14Z","updated_at":"2016-11-16T09:08:35Z","pushed_at":"2016-11-17T13:01:24Z","git_url":"git://github.com/Cepave/open-falcon-backend.git","ssh_url":"git@github.com:Cepave/open-falcon-backend.git","clone_url":"https://github.com/Cepave/open-falcon-backend.git","svn_url":"https://github.com/Cepave/open-falcon-backend","homepage":null,"size":16976,"stargazers_count":6,"watchers_count":6,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":0,"forks":12,"open_issues":0,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls/182"},"html":{"href":"https://github.com/Cepave/open-falcon-backend/pull/182"},"issue":{"href":"https://api.github.com/repos/Cepave/open-falcon-backend/issues/182"},"comments":{"href":"https://api.github.com/repos/Cepave/open-falcon-backend/issues/182/comments"},"review_comments":{"href":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls/182/comments"},"review_comment":{"href":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cepave/open-falcon-backend/pulls/182/commits"},"statuses":{"href":"https://api.github.com/repos/Cepave/open-falcon-backend/statuses/5d88fa7f1691cea3a1b2d9c0acc47fd624fe0802"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"hitripod","id":550166,"avatar_url":"https://avatars.githubusercontent.com/u/550166?v=3","gravatar_id":"","url":"https://api.github.com/users/hitripod","html_url":"https://github.com/hitripod","followers_url":"https://api.github.com/users/hitripod/followers","following_url":"https://api.github.com/users/hitripod/following{/other_user}","gists_url":"https://api.github.com/users/hitripod/gists{/gist_id}","starred_url":"https://api.github.com/users/hitripod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hitripod/subscriptions","organizations_url":"https://api.github.com/users/hitripod/orgs","repos_url":"https://api.github.com/users/hitripod/repos","events_url":"https://api.github.com/users/hitripod/events{/privacy}","received_events_url":"https://api.github.com/users/hitripod/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":10,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"hitripod"}}