{"action":"closed","number":5029,"pull_request":{"url":"https://api.github.com/repos/vmware/harbor/pulls/5029","id":189589271,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5NTg5Mjcx","html_url":"https://github.com/vmware/harbor/pull/5029","diff_url":"https://github.com/vmware/harbor/pull/5029.diff","patch_url":"https://github.com/vmware/harbor/pull/5029.patch","issue_url":"https://api.github.com/repos/vmware/harbor/issues/5029","number":5029,"state":"closed","locked":false,"title":"Add support for mysql to pgsql to DB migrator","user":{"login":"wy65701436","id":2841473,"node_id":"MDQ6VXNlcjI4NDE0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2841473?v=4","gravatar_id":"","url":"https://api.github.com/users/wy65701436","html_url":"https://github.com/wy65701436","followers_url":"https://api.github.com/users/wy65701436/followers","following_url":"https://api.github.com/users/wy65701436/following{/other_user}","gists_url":"https://api.github.com/users/wy65701436/gists{/gist_id}","starred_url":"https://api.github.com/users/wy65701436/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wy65701436/subscriptions","organizations_url":"https://api.github.com/users/wy65701436/orgs","repos_url":"https://api.github.com/users/wy65701436/repos","events_url":"https://api.github.com/users/wy65701436/events{/privacy}","received_events_url":"https://api.github.com/users/wy65701436/received_events","type":"User","site_admin":false},"body":"This commit is to implement db migration from mysql to pgsql, this is specific step for user to upgrade harbor across v1.5.0, as we have move harbor DB to pgsql from 1.5.0. It covers harbor db and notary db migration.\r\n\r\nThe upgrade path from v1.2.0 to v1.6.0;\r\nv1.2.0(mysql) -> v1.5.0(mysql) -> v1.5.0(pgsql) -> v1.6.0(pgsql)\r\n\r\n[Tested]\r\n1, From 1.2.0 to current version(with and without notary)\r\n2, From 1.3.0 to current version(with and without notary)\r\n3, From 1.4.0 to current version(with and without notary)\r\n\r\n[Usage]\r\n1, upgrade harbor DB: docker run -it -e DB_USR=root -e DB_PWD=${pwd} -v /data/database/:/var/lib/mysql vmware/harbor-migrator:dev --db up\r\n2, upgrade notary DB: docker run -it  -v /data/notary-db/:/var/lib/mysql -v /data/database:/var/lib/postgresql/data vmware/harbor-migrator:dev --db up\r\n\r\nYou need to run above two steps to migrate all DBs. If no require to migrate notary, just run step 1 only.\r\n\r\n[Limitation]\r\nFor notary migration, there is a necessary precondition that you should not launch harbor before doing it, otherwise the migrator will give a waring message and stop the process.\r\n\r\n[Where to get migrator]\r\nFrom the local offline installer, this PR also fix issue #4847 \r\n\r\n","created_at":"2018-05-22T08:51:59Z","updated_at":"2018-06-01T06:58:44Z","closed_at":"2018-06-01T06:58:44Z","merged_at":"2018-06-01T06:58:44Z","merge_commit_sha":"6d800cabbd9cd5fecdd3bc988ed7024a101762d6","assignee":{"login":"reasonerjt","id":2390463,"node_id":"MDQ6VXNlcjIzOTA0NjM=","avatar_url":"https://avatars0.githubusercontent.com/u/2390463?v=4","gravatar_id":"","url":"https://api.github.com/users/reasonerjt","html_url":"https://github.com/reasonerjt","followers_url":"https://api.github.com/users/reasonerjt/followers","following_url":"https://api.github.com/users/reasonerjt/following{/other_user}","gists_url":"https://api.github.com/users/reasonerjt/gists{/gist_id}","starred_url":"https://api.github.com/users/reasonerjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reasonerjt/subscriptions","organizations_url":"https://api.github.com/users/reasonerjt/orgs","repos_url":"https://api.github.com/users/reasonerjt/repos","events_url":"https://api.github.com/users/reasonerjt/events{/privacy}","received_events_url":"https://api.github.com/users/reasonerjt/received_events","type":"User","site_admin":false},"assignees":[{"login":"reasonerjt","id":2390463,"node_id":"MDQ6VXNlcjIzOTA0NjM=","avatar_url":"https://avatars0.githubusercontent.com/u/2390463?v=4","gravatar_id":"","url":"https://api.github.com/users/reasonerjt","html_url":"https://github.com/reasonerjt","followers_url":"https://api.github.com/users/reasonerjt/followers","following_url":"https://api.github.com/users/reasonerjt/following{/other_user}","gists_url":"https://api.github.com/users/reasonerjt/gists{/gist_id}","starred_url":"https://api.github.com/users/reasonerjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reasonerjt/subscriptions","organizations_url":"https://api.github.com/users/reasonerjt/orgs","repos_url":"https://api.github.com/users/reasonerjt/repos","events_url":"https://api.github.com/users/reasonerjt/events{/privacy}","received_events_url":"https://api.github.com/users/reasonerjt/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":350773817,"node_id":"MDU6TGFiZWwzNTA3NzM4MTc=","url":"https://api.github.com/repos/vmware/harbor/labels/cla-not-required","name":"cla-not-required","color":"159818","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/harbor/pulls/5029/commits","review_comments_url":"https://api.github.com/repos/vmware/harbor/pulls/5029/comments","review_comment_url":"https://api.github.com/repos/vmware/harbor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/harbor/issues/5029/comments","statuses_url":"https://api.github.com/repos/vmware/harbor/statuses/9ebba2f693fa06deda2cdbdf6fb0e65aefe6422e","head":{"label":"wy65701436:mysql-pgsql","ref":"mysql-pgsql","sha":"9ebba2f693fa06deda2cdbdf6fb0e65aefe6422e","user":{"login":"wy65701436","id":2841473,"node_id":"MDQ6VXNlcjI4NDE0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2841473?v=4","gravatar_id":"","url":"https://api.github.com/users/wy65701436","html_url":"https://github.com/wy65701436","followers_url":"https://api.github.com/users/wy65701436/followers","following_url":"https://api.github.com/users/wy65701436/following{/other_user}","gists_url":"https://api.github.com/users/wy65701436/gists{/gist_id}","starred_url":"https://api.github.com/users/wy65701436/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wy65701436/subscriptions","organizations_url":"https://api.github.com/users/wy65701436/orgs","repos_url":"https://api.github.com/users/wy65701436/repos","events_url":"https://api.github.com/users/wy65701436/events{/privacy}","received_events_url":"https://api.github.com/users/wy65701436/received_events","type":"User","site_admin":false},"repo":{"id":87521968,"node_id":"MDEwOlJlcG9zaXRvcnk4NzUyMTk2OA==","name":"harbor","full_name":"wy65701436/harbor","owner":{"login":"wy65701436","id":2841473,"node_id":"MDQ6VXNlcjI4NDE0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2841473?v=4","gravatar_id":"","url":"https://api.github.com/users/wy65701436","html_url":"https://github.com/wy65701436","followers_url":"https://api.github.com/users/wy65701436/followers","following_url":"https://api.github.com/users/wy65701436/following{/other_user}","gists_url":"https://api.github.com/users/wy65701436/gists{/gist_id}","starred_url":"https://api.github.com/users/wy65701436/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wy65701436/subscriptions","organizations_url":"https://api.github.com/users/wy65701436/orgs","repos_url":"https://api.github.com/users/wy65701436/repos","events_url":"https://api.github.com/users/wy65701436/events{/privacy}","received_events_url":"https://api.github.com/users/wy65701436/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wy65701436/harbor","description":"An enterprise-class container registry server based on Docker Distribution","fork":true,"url":"https://api.github.com/repos/wy65701436/harbor","forks_url":"https://api.github.com/repos/wy65701436/harbor/forks","keys_url":"https://api.github.com/repos/wy65701436/harbor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wy65701436/harbor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wy65701436/harbor/teams","hooks_url":"https://api.github.com/repos/wy65701436/harbor/hooks","issue_events_url":"https://api.github.com/repos/wy65701436/harbor/issues/events{/number}","events_url":"https://api.github.com/repos/wy65701436/harbor/events","assignees_url":"https://api.github.com/repos/wy65701436/harbor/assignees{/user}","branches_url":"https://api.github.com/repos/wy65701436/harbor/branches{/branch}","tags_url":"https://api.github.com/repos/wy65701436/harbor/tags","blobs_url":"https://api.github.com/repos/wy65701436/harbor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wy65701436/harbor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wy65701436/harbor/git/refs{/sha}","trees_url":"https://api.github.com/repos/wy65701436/harbor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wy65701436/harbor/statuses/{sha}","languages_url":"https://api.github.com/repos/wy65701436/harbor/languages","stargazers_url":"https://api.github.com/repos/wy65701436/harbor/stargazers","contributors_url":"https://api.github.com/repos/wy65701436/harbor/contributors","subscribers_url":"https://api.github.com/repos/wy65701436/harbor/subscribers","subscription_url":"https://api.github.com/repos/wy65701436/harbor/subscription","commits_url":"https://api.github.com/repos/wy65701436/harbor/commits{/sha}","git_commits_url":"https://api.github.com/repos/wy65701436/harbor/git/commits{/sha}","comments_url":"https://api.github.com/repos/wy65701436/harbor/comments{/number}","issue_comment_url":"https://api.github.com/repos/wy65701436/harbor/issues/comments{/number}","contents_url":"https://api.github.com/repos/wy65701436/harbor/contents/{+path}","compare_url":"https://api.github.com/repos/wy65701436/harbor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wy65701436/harbor/merges","archive_url":"https://api.github.com/repos/wy65701436/harbor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wy65701436/harbor/downloads","issues_url":"https://api.github.com/repos/wy65701436/harbor/issues{/number}","pulls_url":"https://api.github.com/repos/wy65701436/harbor/pulls{/number}","milestones_url":"https://api.github.com/repos/wy65701436/harbor/milestones{/number}","notifications_url":"https://api.github.com/repos/wy65701436/harbor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wy65701436/harbor/labels{/name}","releases_url":"https://api.github.com/repos/wy65701436/harbor/releases{/id}","deployments_url":"https://api.github.com/repos/wy65701436/harbor/deployments","created_at":"2017-04-07T08:14:13Z","updated_at":"2018-05-31T05:47:05Z","pushed_at":"2018-06-01T06:26:32Z","git_url":"git://github.com/wy65701436/harbor.git","ssh_url":"git@github.com:wy65701436/harbor.git","clone_url":"https://github.com/wy65701436/harbor.git","svn_url":"https://github.com/wy65701436/harbor","homepage":"http://vmware.github.io/harbor/","size":88665,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"vmware:master","ref":"master","sha":"d87c9c3c3882277850d2a2cad67919032cf3bf63","user":{"login":"vmware","id":473334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzMzNA==","avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":50613991,"node_id":"MDEwOlJlcG9zaXRvcnk1MDYxMzk5MQ==","name":"harbor","full_name":"vmware/harbor","owner":{"login":"vmware","id":473334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzMzNA==","avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/harbor","description":"An enterprise-class container registry server based on Docker Distribution","fork":false,"url":"https://api.github.com/repos/vmware/harbor","forks_url":"https://api.github.com/repos/vmware/harbor/forks","keys_url":"https://api.github.com/repos/vmware/harbor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/harbor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/harbor/teams","hooks_url":"https://api.github.com/repos/vmware/harbor/hooks","issue_events_url":"https://api.github.com/repos/vmware/harbor/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/harbor/events","assignees_url":"https://api.github.com/repos/vmware/harbor/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/harbor/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/harbor/tags","blobs_url":"https://api.github.com/repos/vmware/harbor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/harbor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/harbor/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/harbor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/harbor/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/harbor/languages","stargazers_url":"https://api.github.com/repos/vmware/harbor/stargazers","contributors_url":"https://api.github.com/repos/vmware/harbor/contributors","subscribers_url":"https://api.github.com/repos/vmware/harbor/subscribers","subscription_url":"https://api.github.com/repos/vmware/harbor/subscription","commits_url":"https://api.github.com/repos/vmware/harbor/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/harbor/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/harbor/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/harbor/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/harbor/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/harbor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/harbor/merges","archive_url":"https://api.github.com/repos/vmware/harbor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/harbor/downloads","issues_url":"https://api.github.com/repos/vmware/harbor/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/harbor/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/harbor/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/harbor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/harbor/labels{/name}","releases_url":"https://api.github.com/repos/vmware/harbor/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/harbor/deployments","created_at":"2016-01-28T21:10:28Z","updated_at":"2018-06-01T06:38:16Z","pushed_at":"2018-06-01T06:58:44Z","git_url":"git://github.com/vmware/harbor.git","ssh_url":"git@github.com:vmware/harbor.git","clone_url":"https://github.com/vmware/harbor.git","svn_url":"https://github.com/vmware/harbor","homepage":"http://vmware.github.io/harbor/","size":81312,"stargazers_count":4358,"watchers_count":4358,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1228,"mirror_url":null,"archived":false,"open_issues_count":533,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1228,"open_issues":533,"watchers":4358,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/harbor/pulls/5029"},"html":{"href":"https://github.com/vmware/harbor/pull/5029"},"issue":{"href":"https://api.github.com/repos/vmware/harbor/issues/5029"},"comments":{"href":"https://api.github.com/repos/vmware/harbor/issues/5029/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/harbor/pulls/5029/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/harbor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/harbor/pulls/5029/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/harbor/statuses/9ebba2f693fa06deda2cdbdf6fb0e65aefe6422e"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"wy65701436","id":2841473,"node_id":"MDQ6VXNlcjI4NDE0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2841473?v=4","gravatar_id":"","url":"https://api.github.com/users/wy65701436","html_url":"https://github.com/wy65701436","followers_url":"https://api.github.com/users/wy65701436/followers","following_url":"https://api.github.com/users/wy65701436/following{/other_user}","gists_url":"https://api.github.com/users/wy65701436/gists{/gist_id}","starred_url":"https://api.github.com/users/wy65701436/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wy65701436/subscriptions","organizations_url":"https://api.github.com/users/wy65701436/orgs","repos_url":"https://api.github.com/users/wy65701436/repos","events_url":"https://api.github.com/users/wy65701436/events{/privacy}","received_events_url":"https://api.github.com/users/wy65701436/received_events","type":"User","site_admin":false},"comments":3,"review_comments":39,"maintainer_can_modify":false,"commits":1,"additions":1107,"deletions":939,"changed_files":51}}
{"actor":{"display_login":"wy65701436"}}