{"action":"created","issue":{"url":"https://api.github.com/repos/zzzeek/alembic/issues/19","labels_url":"https://api.github.com/repos/zzzeek/alembic/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/zzzeek/alembic/issues/19/comments","events_url":"https://api.github.com/repos/zzzeek/alembic/issues/19/events","html_url":"https://github.com/zzzeek/alembic/pull/19","id":106590507,"number":19,"title":"[WIP] Add include_branch arg to 'current' function","user":{"login":"mattt416","id":16207,"avatar_url":"https://avatars.githubusercontent.com/u/16207?v=3","gravatar_id":"","url":"https://api.github.com/users/mattt416","html_url":"https://github.com/mattt416","followers_url":"https://api.github.com/users/mattt416/followers","following_url":"https://api.github.com/users/mattt416/following{/other_user}","gists_url":"https://api.github.com/users/mattt416/gists{/gist_id}","starred_url":"https://api.github.com/users/mattt416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattt416/subscriptions","organizations_url":"https://api.github.com/users/mattt416/orgs","repos_url":"https://api.github.com/users/mattt416/repos","events_url":"https://api.github.com/users/mattt416/events{/privacy}","received_events_url":"https://api.github.com/users/mattt416/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-15T16:09:54Z","updated_at":"2015-09-16T15:50:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zzzeek/alembic/pulls/19","html_url":"https://github.com/zzzeek/alembic/pull/19","diff_url":"https://github.com/zzzeek/alembic/pull/19.diff","patch_url":"https://github.com/zzzeek/alembic/pull/19.patch"},"body":"This commit updates the 'current' function in alembic/command.py by\r\nadding include_branches argument.  With this in place, we then pass\r\ninclude_branch to the 'cmd_format' call inside 'current'.\r\n\r\nThis is being implemented to help solve [1].  OpenStack Neutron uses\r\nmultiple alembic branches and as a deployer I would like to use\r\n'neutron-db-manage current' (which is leveraging alembic's 'current')\r\nto determine which revision is associated with which branch so I can\r\nselectively apply migrations for each branch.  This is necessary as one\r\nbranch can have migrations run while neutron-server is running while the\r\nother should be run with neutron-server stopped.\r\n\r\nI am not familiar w/ alembic, so please let me know if this change is\r\ninappropriate or if there is a better way to achieve the desired\r\nresult.\r\n\r\n[1] https://bugs.launchpad.net/neutron/+bug/1488021"},"comment":{"url":"https://api.github.com/repos/zzzeek/alembic/issues/comments/140783775","html_url":"https://github.com/zzzeek/alembic/pull/19#issuecomment-140783775","issue_url":"https://api.github.com/repos/zzzeek/alembic/issues/19","id":140783775,"user":{"login":"mattt416","id":16207,"avatar_url":"https://avatars.githubusercontent.com/u/16207?v=3","gravatar_id":"","url":"https://api.github.com/users/mattt416","html_url":"https://github.com/mattt416","followers_url":"https://api.github.com/users/mattt416/followers","following_url":"https://api.github.com/users/mattt416/following{/other_user}","gists_url":"https://api.github.com/users/mattt416/gists{/gist_id}","starred_url":"https://api.github.com/users/mattt416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattt416/subscriptions","organizations_url":"https://api.github.com/users/mattt416/orgs","repos_url":"https://api.github.com/users/mattt416/repos","events_url":"https://api.github.com/users/mattt416/events{/privacy}","received_events_url":"https://api.github.com/users/mattt416/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T15:50:52Z","updated_at":"2015-09-16T15:50:52Z","body":"Hi @zzzeek,\r\n\r\nI did see --verbose but it seemed overly verbose at the time.  :)  However, as you point out that may be the best solution since it requires no changes to alembic for us to get the information we need.  Let me go back and hack around w/ neutron's alembic wrapper and see if --verbose will do what we need.\r\n\r\nPlease feel free to close this PR in the mean time -- should I need to pursue this patch further I can create a new PR.  Alternatively, I'll close the PR once I've confirmed that --verbose works.\r\n\r\nThanks!\r\n\r\n--Matt"}}