{"action":"created","comment":{"url":"https://api.github.com/repos/zulip/zulip/pulls/comments/192486343","pull_request_review_id":125280945,"id":192486343,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjQ4NjM0Mw==","diff_hunk":"@@ -21,6 +21,33 @@\n UUID_VAR_DIR = get_dev_uuid_var_path()\n FILENAME_SPLITTER = re.compile('[\\W\\-_]')\n \n+def run_db_migrations(**options: Any) -> None:\n+    for app_config in apps.get_app_configs():\n+        if module_has_submodule(app_config.module, \"management\"):\n+            import_module('.management', app_config.name)\n+\n+    app_label = options['app_label'] if options.get('app_label') else None\n+    db = options.get('database', DEFAULT_DB_ALIAS)\n+    migration_status_file = options.get('migration_status_file', 'migration_status_test')\n+    out = StringIO()","path":"zerver/lib/test_fixtures.py","position":12,"original_position":12,"commit_id":"0e70097e8269b0285b8f053c2ca7045de936ac2c","original_commit_id":"0e70097e8269b0285b8f053c2ca7045de936ac2c","user":{"login":"timabbott","id":2746074,"node_id":"MDQ6VXNlcjI3NDYwNzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2746074?v=4","gravatar_id":"","url":"https://api.github.com/users/timabbott","html_url":"https://github.com/timabbott","followers_url":"https://api.github.com/users/timabbott/followers","following_url":"https://api.github.com/users/timabbott/following{/other_user}","gists_url":"https://api.github.com/users/timabbott/gists{/gist_id}","starred_url":"https://api.github.com/users/timabbott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timabbott/subscriptions","organizations_url":"https://api.github.com/users/timabbott/orgs","repos_url":"https://api.github.com/users/timabbott/repos","events_url":"https://api.github.com/users/timabbott/events{/privacy}","received_events_url":"https://api.github.com/users/timabbott/received_events","type":"User","site_admin":false},"body":"This seems unused?","created_at":"2018-06-01T18:56:13Z","updated_at":"2018-06-01T18:56:14Z","html_url":"https://github.com/zulip/zulip/pull/9625#discussion_r192486343","pull_request_url":"https://api.github.com/repos/zulip/zulip/pulls/9625","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/zulip/zulip/pulls/comments/192486343"},"html":{"href":"https://github.com/zulip/zulip/pull/9625#discussion_r192486343"},"pull_request":{"href":"https://api.github.com/repos/zulip/zulip/pulls/9625"}}},"pull_request":{"url":"https://api.github.com/repos/zulip/zulip/pulls/9625","id":192113473,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMTEzNDcz","html_url":"https://github.com/zulip/zulip/pull/9625","diff_url":"https://github.com/zulip/zulip/pull/9625.diff","patch_url":"https://github.com/zulip/zulip/pull/9625.patch","issue_url":"https://api.github.com/repos/zulip/zulip/issues/9625","number":9625,"state":"open","locked":false,"title":"provisioning: Don't rebuild DB if running migrations is sufficient.","user":{"login":"adnrs96","id":17237412,"node_id":"MDQ6VXNlcjE3MjM3NDEy","avatar_url":"https://avatars3.githubusercontent.com/u/17237412?v=4","gravatar_id":"","url":"https://api.github.com/users/adnrs96","html_url":"https://github.com/adnrs96","followers_url":"https://api.github.com/users/adnrs96/followers","following_url":"https://api.github.com/users/adnrs96/following{/other_user}","gists_url":"https://api.github.com/users/adnrs96/gists{/gist_id}","starred_url":"https://api.github.com/users/adnrs96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adnrs96/subscriptions","organizations_url":"https://api.github.com/users/adnrs96/orgs","repos_url":"https://api.github.com/users/adnrs96/repos","events_url":"https://api.github.com/users/adnrs96/events{/privacy}","received_events_url":"https://api.github.com/users/adnrs96/received_events","type":"User","site_admin":false},"body":"So to do this one we basically rather than just saying in Boolean terms if db was current or not, we make levels 3, 2, 1 which are returned by  `is_template_database_current` and on that basis we decide what has to be done.\r\n\r\nFixes: #9512.\r\n","created_at":"2018-06-01T18:46:08Z","updated_at":"2018-06-01T18:56:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"956cae7030cb74c9d95f3cd9972edefe2d0950c3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":804197644,"node_id":"MDU6TGFiZWw4MDQxOTc2NDQ=","url":"https://api.github.com/repos/zulip/zulip/labels/size:%20L","name":"size: L","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/zulip/zulip/pulls/9625/commits","review_comments_url":"https://api.github.com/repos/zulip/zulip/pulls/9625/comments","review_comment_url":"https://api.github.com/repos/zulip/zulip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/9625/comments","statuses_url":"https://api.github.com/repos/zulip/zulip/statuses/0e70097e8269b0285b8f053c2ca7045de936ac2c","head":{"label":"adnrs96:dev-db","ref":"dev-db","sha":"0e70097e8269b0285b8f053c2ca7045de936ac2c","user":{"login":"adnrs96","id":17237412,"node_id":"MDQ6VXNlcjE3MjM3NDEy","avatar_url":"https://avatars3.githubusercontent.com/u/17237412?v=4","gravatar_id":"","url":"https://api.github.com/users/adnrs96","html_url":"https://github.com/adnrs96","followers_url":"https://api.github.com/users/adnrs96/followers","following_url":"https://api.github.com/users/adnrs96/following{/other_user}","gists_url":"https://api.github.com/users/adnrs96/gists{/gist_id}","starred_url":"https://api.github.com/users/adnrs96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adnrs96/subscriptions","organizations_url":"https://api.github.com/users/adnrs96/orgs","repos_url":"https://api.github.com/users/adnrs96/repos","events_url":"https://api.github.com/users/adnrs96/events{/privacy}","received_events_url":"https://api.github.com/users/adnrs96/received_events","type":"User","site_admin":false},"repo":{"id":77789582,"node_id":"MDEwOlJlcG9zaXRvcnk3Nzc4OTU4Mg==","name":"zulip","full_name":"adnrs96/zulip","owner":{"login":"adnrs96","id":17237412,"node_id":"MDQ6VXNlcjE3MjM3NDEy","avatar_url":"https://avatars3.githubusercontent.com/u/17237412?v=4","gravatar_id":"","url":"https://api.github.com/users/adnrs96","html_url":"https://github.com/adnrs96","followers_url":"https://api.github.com/users/adnrs96/followers","following_url":"https://api.github.com/users/adnrs96/following{/other_user}","gists_url":"https://api.github.com/users/adnrs96/gists{/gist_id}","starred_url":"https://api.github.com/users/adnrs96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adnrs96/subscriptions","organizations_url":"https://api.github.com/users/adnrs96/orgs","repos_url":"https://api.github.com/users/adnrs96/repos","events_url":"https://api.github.com/users/adnrs96/events{/privacy}","received_events_url":"https://api.github.com/users/adnrs96/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adnrs96/zulip","description":"Zulip server - powerful open source group chat","fork":true,"url":"https://api.github.com/repos/adnrs96/zulip","forks_url":"https://api.github.com/repos/adnrs96/zulip/forks","keys_url":"https://api.github.com/repos/adnrs96/zulip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adnrs96/zulip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adnrs96/zulip/teams","hooks_url":"https://api.github.com/repos/adnrs96/zulip/hooks","issue_events_url":"https://api.github.com/repos/adnrs96/zulip/issues/events{/number}","events_url":"https://api.github.com/repos/adnrs96/zulip/events","assignees_url":"https://api.github.com/repos/adnrs96/zulip/assignees{/user}","branches_url":"https://api.github.com/repos/adnrs96/zulip/branches{/branch}","tags_url":"https://api.github.com/repos/adnrs96/zulip/tags","blobs_url":"https://api.github.com/repos/adnrs96/zulip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adnrs96/zulip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adnrs96/zulip/git/refs{/sha}","trees_url":"https://api.github.com/repos/adnrs96/zulip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adnrs96/zulip/statuses/{sha}","languages_url":"https://api.github.com/repos/adnrs96/zulip/languages","stargazers_url":"https://api.github.com/repos/adnrs96/zulip/stargazers","contributors_url":"https://api.github.com/repos/adnrs96/zulip/contributors","subscribers_url":"https://api.github.com/repos/adnrs96/zulip/subscribers","subscription_url":"https://api.github.com/repos/adnrs96/zulip/subscription","commits_url":"https://api.github.com/repos/adnrs96/zulip/commits{/sha}","git_commits_url":"https://api.github.com/repos/adnrs96/zulip/git/commits{/sha}","comments_url":"https://api.github.com/repos/adnrs96/zulip/comments{/number}","issue_comment_url":"https://api.github.com/repos/adnrs96/zulip/issues/comments{/number}","contents_url":"https://api.github.com/repos/adnrs96/zulip/contents/{+path}","compare_url":"https://api.github.com/repos/adnrs96/zulip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adnrs96/zulip/merges","archive_url":"https://api.github.com/repos/adnrs96/zulip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adnrs96/zulip/downloads","issues_url":"https://api.github.com/repos/adnrs96/zulip/issues{/number}","pulls_url":"https://api.github.com/repos/adnrs96/zulip/pulls{/number}","milestones_url":"https://api.github.com/repos/adnrs96/zulip/milestones{/number}","notifications_url":"https://api.github.com/repos/adnrs96/zulip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adnrs96/zulip/labels{/name}","releases_url":"https://api.github.com/repos/adnrs96/zulip/releases{/id}","deployments_url":"https://api.github.com/repos/adnrs96/zulip/deployments","created_at":"2017-01-01T17:46:19Z","updated_at":"2017-01-01T17:46:29Z","pushed_at":"2018-06-01T18:43:10Z","git_url":"git://github.com/adnrs96/zulip.git","ssh_url":"git@github.com:adnrs96/zulip.git","clone_url":"https://github.com/adnrs96/zulip.git","svn_url":"https://github.com/adnrs96/zulip","homepage":"","size":205429,"stargazers_count":0,"watchers_count":0,"language":"Python","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":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zulip:master","ref":"master","sha":"c37fe998d232d39b4e3f435598e9f129caf659dc","user":{"login":"zulip","id":4921959,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5MjE5NTk=","avatar_url":"https://avatars2.githubusercontent.com/u/4921959?v=4","gravatar_id":"","url":"https://api.github.com/users/zulip","html_url":"https://github.com/zulip","followers_url":"https://api.github.com/users/zulip/followers","following_url":"https://api.github.com/users/zulip/following{/other_user}","gists_url":"https://api.github.com/users/zulip/gists{/gist_id}","starred_url":"https://api.github.com/users/zulip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zulip/subscriptions","organizations_url":"https://api.github.com/users/zulip/orgs","repos_url":"https://api.github.com/users/zulip/repos","events_url":"https://api.github.com/users/zulip/events{/privacy}","received_events_url":"https://api.github.com/users/zulip/received_events","type":"Organization","site_admin":false},"repo":{"id":43160685,"node_id":"MDEwOlJlcG9zaXRvcnk0MzE2MDY4NQ==","name":"zulip","full_name":"zulip/zulip","owner":{"login":"zulip","id":4921959,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5MjE5NTk=","avatar_url":"https://avatars2.githubusercontent.com/u/4921959?v=4","gravatar_id":"","url":"https://api.github.com/users/zulip","html_url":"https://github.com/zulip","followers_url":"https://api.github.com/users/zulip/followers","following_url":"https://api.github.com/users/zulip/following{/other_user}","gists_url":"https://api.github.com/users/zulip/gists{/gist_id}","starred_url":"https://api.github.com/users/zulip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zulip/subscriptions","organizations_url":"https://api.github.com/users/zulip/orgs","repos_url":"https://api.github.com/users/zulip/repos","events_url":"https://api.github.com/users/zulip/events{/privacy}","received_events_url":"https://api.github.com/users/zulip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zulip/zulip","description":"Zulip server - powerful open source team chat","fork":false,"url":"https://api.github.com/repos/zulip/zulip","forks_url":"https://api.github.com/repos/zulip/zulip/forks","keys_url":"https://api.github.com/repos/zulip/zulip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zulip/zulip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zulip/zulip/teams","hooks_url":"https://api.github.com/repos/zulip/zulip/hooks","issue_events_url":"https://api.github.com/repos/zulip/zulip/issues/events{/number}","events_url":"https://api.github.com/repos/zulip/zulip/events","assignees_url":"https://api.github.com/repos/zulip/zulip/assignees{/user}","branches_url":"https://api.github.com/repos/zulip/zulip/branches{/branch}","tags_url":"https://api.github.com/repos/zulip/zulip/tags","blobs_url":"https://api.github.com/repos/zulip/zulip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zulip/zulip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zulip/zulip/git/refs{/sha}","trees_url":"https://api.github.com/repos/zulip/zulip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zulip/zulip/statuses/{sha}","languages_url":"https://api.github.com/repos/zulip/zulip/languages","stargazers_url":"https://api.github.com/repos/zulip/zulip/stargazers","contributors_url":"https://api.github.com/repos/zulip/zulip/contributors","subscribers_url":"https://api.github.com/repos/zulip/zulip/subscribers","subscription_url":"https://api.github.com/repos/zulip/zulip/subscription","commits_url":"https://api.github.com/repos/zulip/zulip/commits{/sha}","git_commits_url":"https://api.github.com/repos/zulip/zulip/git/commits{/sha}","comments_url":"https://api.github.com/repos/zulip/zulip/comments{/number}","issue_comment_url":"https://api.github.com/repos/zulip/zulip/issues/comments{/number}","contents_url":"https://api.github.com/repos/zulip/zulip/contents/{+path}","compare_url":"https://api.github.com/repos/zulip/zulip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zulip/zulip/merges","archive_url":"https://api.github.com/repos/zulip/zulip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zulip/zulip/downloads","issues_url":"https://api.github.com/repos/zulip/zulip/issues{/number}","pulls_url":"https://api.github.com/repos/zulip/zulip/pulls{/number}","milestones_url":"https://api.github.com/repos/zulip/zulip/milestones{/number}","notifications_url":"https://api.github.com/repos/zulip/zulip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zulip/zulip/labels{/name}","releases_url":"https://api.github.com/repos/zulip/zulip/releases{/id}","deployments_url":"https://api.github.com/repos/zulip/zulip/deployments","created_at":"2015-09-25T16:37:25Z","updated_at":"2018-06-01T18:39:22Z","pushed_at":"2018-06-01T18:54:31Z","git_url":"git://github.com/zulip/zulip.git","ssh_url":"git@github.com:zulip/zulip.git","clone_url":"https://github.com/zulip/zulip.git","svn_url":"https://github.com/zulip/zulip","homepage":"https://zulip.org/","size":207270,"stargazers_count":7299,"watchers_count":7299,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2232,"mirror_url":null,"archived":false,"open_issues_count":1018,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2232,"open_issues":1018,"watchers":7299,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zulip/zulip/pulls/9625"},"html":{"href":"https://github.com/zulip/zulip/pull/9625"},"issue":{"href":"https://api.github.com/repos/zulip/zulip/issues/9625"},"comments":{"href":"https://api.github.com/repos/zulip/zulip/issues/9625/comments"},"review_comments":{"href":"https://api.github.com/repos/zulip/zulip/pulls/9625/comments"},"review_comment":{"href":"https://api.github.com/repos/zulip/zulip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zulip/zulip/pulls/9625/commits"},"statuses":{"href":"https://api.github.com/repos/zulip/zulip/statuses/0e70097e8269b0285b8f053c2ca7045de936ac2c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"timabbott"}}