{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/996","labels_url":"https://api.github.com/repos/elixir-lang/ecto/issues/996/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/ecto/issues/996/comments","events_url":"https://api.github.com/repos/elixir-lang/ecto/issues/996/events","html_url":"https://github.com/elixir-lang/ecto/pull/996","id":110296984,"number":996,"title":"Correctly shutdown adapter application after migrating","user":{"login":"vanstee","id":228734,"avatar_url":"https://avatars.githubusercontent.com/u/228734?v=3","gravatar_id":"","url":"https://api.github.com/users/vanstee","html_url":"https://github.com/vanstee","followers_url":"https://api.github.com/users/vanstee/followers","following_url":"https://api.github.com/users/vanstee/following{/other_user}","gists_url":"https://api.github.com/users/vanstee/gists{/gist_id}","starred_url":"https://api.github.com/users/vanstee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanstee/subscriptions","organizations_url":"https://api.github.com/users/vanstee/orgs","repos_url":"https://api.github.com/users/vanstee/repos","events_url":"https://api.github.com/users/vanstee/events{/privacy}","received_events_url":"https://api.github.com/users/vanstee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-07T19:14:42Z","updated_at":"2015-10-08T01:28:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elixir-lang/ecto/pulls/996","html_url":"https://github.com/elixir-lang/ecto/pull/996","diff_url":"https://github.com/elixir-lang/ecto/pull/996.diff","patch_url":"https://github.com/elixir-lang/ecto/pull/996.patch"},"body":"Looks like there was a simple mistake when shutting down the adapter application after migrating. Both `Repo`s and `Adapter`s have an `@adapter` and the `Repo`'s was used in the migration instead of the application name in the `Adapter`, which results in the following error after migrating: \r\n\r\n```\r\n** (MatchError) no match of right hand side value: {:error, {Ecto.Adapters.Postgres, {'no such file or directory', 'Elixir.Ecto.Adapters.Postgres.app'}}}\r\n    lib/mix/tasks/ecto.migrate.ex:53: Mix.Tasks.Ecto.Migrate.run/2\r\n    (mix) lib/mix/task.ex:291: Mix.Task.run_alias/3\r\n    (mix) lib/mix/task.ex:243: Mix.Task.run/2\r\n    (mix) lib/mix/task.ex:291: Mix.Task.run_alias/3\r\n    (mix) lib/mix/task.ex:243: Mix.Task.run/2\r\n    (mix) lib/mix/cli.ex:55: Mix.CLI.run_task/2\r\n```\r\n\r\nNot sure if this is the best way to grab the adapters application name, so feel free to fix this up a bit."},"comment":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/comments/146388735","html_url":"https://github.com/elixir-lang/ecto/pull/996#issuecomment-146388735","issue_url":"https://api.github.com/repos/elixir-lang/ecto/issues/996","id":146388735,"user":{"login":"vanstee","id":228734,"avatar_url":"https://avatars.githubusercontent.com/u/228734?v=3","gravatar_id":"","url":"https://api.github.com/users/vanstee","html_url":"https://github.com/vanstee","followers_url":"https://api.github.com/users/vanstee/followers","following_url":"https://api.github.com/users/vanstee/following{/other_user}","gists_url":"https://api.github.com/users/vanstee/gists{/gist_id}","starred_url":"https://api.github.com/users/vanstee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanstee/subscriptions","organizations_url":"https://api.github.com/users/vanstee/orgs","repos_url":"https://api.github.com/users/vanstee/repos","events_url":"https://api.github.com/users/vanstee/events{/privacy}","received_events_url":"https://api.github.com/users/vanstee/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T01:28:49Z","updated_at":"2015-10-08T01:28:49Z","body":"Oh yep that totally works. PR incoming. Thanks @josevalim "}}