{"action":"created","issue":{"url":"https://api.github.com/repos/aartur/mschematool/issues/10","repository_url":"https://api.github.com/repos/aartur/mschematool","labels_url":"https://api.github.com/repos/aartur/mschematool/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/aartur/mschematool/issues/10/comments","events_url":"https://api.github.com/repos/aartur/mschematool/issues/10/events","html_url":"https://github.com/aartur/mschematool/pull/10","id":330072866,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMTcxOTI3","number":10,"title":"Makes mschematool work with multiple postgres schemas","user":{"login":"dirkgr","id":920638,"node_id":"MDQ6VXNlcjkyMDYzOA==","avatar_url":"https://avatars2.githubusercontent.com/u/920638?v=4","gravatar_id":"","url":"https://api.github.com/users/dirkgr","html_url":"https://github.com/dirkgr","followers_url":"https://api.github.com/users/dirkgr/followers","following_url":"https://api.github.com/users/dirkgr/following{/other_user}","gists_url":"https://api.github.com/users/dirkgr/gists{/gist_id}","starred_url":"https://api.github.com/users/dirkgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirkgr/subscriptions","organizations_url":"https://api.github.com/users/dirkgr/orgs","repos_url":"https://api.github.com/users/dirkgr/repos","events_url":"https://api.github.com/users/dirkgr/events{/privacy}","received_events_url":"https://api.github.com/users/dirkgr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-07T00:02:18Z","updated_at":"2018-06-07T04:54:01Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/aartur/mschematool/pulls/10","html_url":"https://github.com/aartur/mschematool/pull/10","diff_url":"https://github.com/aartur/mschematool/pull/10.diff","patch_url":"https://github.com/aartur/mschematool/pull/10.patch"},"body":"There is a problem when you are using multiple postgres schemas (should be called namespace in this usage), and you want to run `mschematool` on more than one of them.\r\n\r\nFor example, I have a database with two schemas, `public`, and `dirkgr`. I want to run `mschematool` on both. The first time I run it on the `public` schema, and everything is fine. The second time, I try to run it on the `dirkgr` schema, and I find that `init_db` does nothing. The problem is that `SELECT * FROM information_schema.tables WHERE table_name=%s` will find the `migrations` table in any of the schemas that are present in the DB, and abort."},"comment":{"url":"https://api.github.com/repos/aartur/mschematool/issues/comments/395292507","html_url":"https://github.com/aartur/mschematool/pull/10#issuecomment-395292507","issue_url":"https://api.github.com/repos/aartur/mschematool/issues/10","id":395292507,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTI5MjUwNw==","user":{"login":"dirkgr","id":920638,"node_id":"MDQ6VXNlcjkyMDYzOA==","avatar_url":"https://avatars2.githubusercontent.com/u/920638?v=4","gravatar_id":"","url":"https://api.github.com/users/dirkgr","html_url":"https://github.com/dirkgr","followers_url":"https://api.github.com/users/dirkgr/followers","following_url":"https://api.github.com/users/dirkgr/following{/other_user}","gists_url":"https://api.github.com/users/dirkgr/gists{/gist_id}","starred_url":"https://api.github.com/users/dirkgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirkgr/subscriptions","organizations_url":"https://api.github.com/users/dirkgr/orgs","repos_url":"https://api.github.com/users/dirkgr/repos","events_url":"https://api.github.com/users/dirkgr/events{/privacy}","received_events_url":"https://api.github.com/users/dirkgr/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T04:54:01Z","updated_at":"2018-06-07T04:54:01Z","author_association":"NONE","body":"You are recommending one set of migrations for the whole database, not for a single schema?\r\n\r\nWe are installing different tools into different schemas, each with their own set of migrations.\r\n\r\nWe are not calling `set search_path` explicitly. We make the schema part of the connection string. It looks like this: https://github.com/allenai/papertasks/blob/master/python/papertasks_test.py#L44"}}
{"actor":{"display_login":"dirkgr"}}