{"action":"created","issue":{"url":"https://api.github.com/repos/hanami/model/issues/322","repository_url":"https://api.github.com/repos/hanami/model","labels_url":"https://api.github.com/repos/hanami/model/issues/322/labels{/name}","comments_url":"https://api.github.com/repos/hanami/model/issues/322/comments","events_url":"https://api.github.com/repos/hanami/model/issues/322/events","html_url":"https://github.com/hanami/model/issues/322","id":160919541,"number":322,"title":"Does Postgres Adapter display the correct error when db exists?","user":{"login":"wjdhamilton","id":7499818,"avatar_url":"https://avatars.githubusercontent.com/u/7499818?v=3","gravatar_id":"","url":"https://api.github.com/users/wjdhamilton","html_url":"https://github.com/wjdhamilton","followers_url":"https://api.github.com/users/wjdhamilton/followers","following_url":"https://api.github.com/users/wjdhamilton/following{/other_user}","gists_url":"https://api.github.com/users/wjdhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/wjdhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjdhamilton/subscriptions","organizations_url":"https://api.github.com/users/wjdhamilton/orgs","repos_url":"https://api.github.com/users/wjdhamilton/repos","events_url":"https://api.github.com/users/wjdhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/wjdhamilton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hanami/model/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"cllns","id":632942,"avatar_url":"https://avatars.githubusercontent.com/u/632942?v=3","gravatar_id":"","url":"https://api.github.com/users/cllns","html_url":"https://github.com/cllns","followers_url":"https://api.github.com/users/cllns/followers","following_url":"https://api.github.com/users/cllns/following{/other_user}","gists_url":"https://api.github.com/users/cllns/gists{/gist_id}","starred_url":"https://api.github.com/users/cllns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cllns/subscriptions","organizations_url":"https://api.github.com/users/cllns/orgs","repos_url":"https://api.github.com/users/cllns/repos","events_url":"https://api.github.com/users/cllns/events{/privacy}","received_events_url":"https://api.github.com/users/cllns/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hanami/model/milestones/15","html_url":"https://github.com/hanami/model/milestones/v0.7.0","labels_url":"https://api.github.com/repos/hanami/model/milestones/15/labels","id":1555003,"number":15,"title":"v0.7.0","description":"","creator":{"login":"jodosha","id":5089,"avatar_url":"https://avatars.githubusercontent.com/u/5089?v=3","gravatar_id":"","url":"https://api.github.com/users/jodosha","html_url":"https://github.com/jodosha","followers_url":"https://api.github.com/users/jodosha/followers","following_url":"https://api.github.com/users/jodosha/following{/other_user}","gists_url":"https://api.github.com/users/jodosha/gists{/gist_id}","starred_url":"https://api.github.com/users/jodosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodosha/subscriptions","organizations_url":"https://api.github.com/users/jodosha/orgs","repos_url":"https://api.github.com/users/jodosha/repos","events_url":"https://api.github.com/users/jodosha/events{/privacy}","received_events_url":"https://api.github.com/users/jodosha/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":14,"state":"open","created_at":"2016-02-01T09:31:49Z","updated_at":"2016-06-20T11:07:10Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-06-17T15:52:25Z","updated_at":"2016-06-20T15:42:50Z","closed_at":null,"body":"Hello everyone!\r\n\r\nWhen running `hanami db create` and there is already a database in existence, the error returned is as follows: \r\n\r\n```\r\ncreatedb: database creation failed. There is 1 other session using the database.\r\n```\r\n\r\nA quick look at the code in model/lib/hanami/model/migrator/postgres_adapter.rb reveals the following snippet: \r\n\r\n```ruby\r\n\r\nmessage = if error_message.match(/already exists/)\r\n              \"createdb: database creation failed. There is 1 other session using the database.\"\r\n```\r\nWhich implies to me that the error message is the same regardless of whether or not there really _is_ another 1 (or many more) sessions using the database. \r\n\r\nI would have expected that the app would differentiate between contexts when another connection is present and when it is simply the case that the db has already been created. Shouldn't the error message simply say that the db already exists if there are no sessions using the db?"},"comment":{"url":"https://api.github.com/repos/hanami/model/issues/comments/227181137","html_url":"https://github.com/hanami/model/issues/322#issuecomment-227181137","issue_url":"https://api.github.com/repos/hanami/model/issues/322","id":227181137,"user":{"login":"wjdhamilton","id":7499818,"avatar_url":"https://avatars.githubusercontent.com/u/7499818?v=3","gravatar_id":"","url":"https://api.github.com/users/wjdhamilton","html_url":"https://github.com/wjdhamilton","followers_url":"https://api.github.com/users/wjdhamilton/followers","following_url":"https://api.github.com/users/wjdhamilton/following{/other_user}","gists_url":"https://api.github.com/users/wjdhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/wjdhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjdhamilton/subscriptions","organizations_url":"https://api.github.com/users/wjdhamilton/orgs","repos_url":"https://api.github.com/users/wjdhamilton/repos","events_url":"https://api.github.com/users/wjdhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/wjdhamilton/received_events","type":"User","site_admin":false},"created_at":"2016-06-20T15:42:50Z","updated_at":"2016-06-20T15:42:50Z","body":"Yes, I’ll take this one. I will probably have to ask you a few questions first but I’ll get on it later this week.\n> On 20 Jun 2016, at 16:39, Sean Collins <notifications@github.com> wrote:\n> \n> @wjdhamilton <https://github.com/wjdhamilton> Want to take this one? If not, I can do it. Feel free to ping me in the Hanami Gitter chat <https://gitter.im/hanami/chat> if you need any help :)\n> \n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub <https://github.com/hanami/model/issues/322#issuecomment-227180221>, or mute the thread <https://github.com/notifications/unsubscribe/AHJwKkLkO5awa4A81WKEp-DOl_hVkKkCks5qNrRIgaJpZM4I4ffB>.\n> \n\n"}}
{"actor":{"display_login":"wjdhamilton"}}