{"action":"created","issue":{"url":"https://api.github.com/repos/influitive/apartment/issues/397","repository_url":"https://api.github.com/repos/influitive/apartment","labels_url":"https://api.github.com/repos/influitive/apartment/issues/397/labels{/name}","comments_url":"https://api.github.com/repos/influitive/apartment/issues/397/comments","events_url":"https://api.github.com/repos/influitive/apartment/issues/397/events","html_url":"https://github.com/influitive/apartment/issues/397","id":205252039,"node_id":"MDU6SXNzdWUyMDUyNTIwMzk=","number":397,"title":"Add Support For Foreign Keys Across Schemas","user":{"login":"robertjwhitney","id":25222,"node_id":"MDQ6VXNlcjI1MjIy","avatar_url":"https://avatars2.githubusercontent.com/u/25222?v=4","gravatar_id":"","url":"https://api.github.com/users/robertjwhitney","html_url":"https://github.com/robertjwhitney","followers_url":"https://api.github.com/users/robertjwhitney/followers","following_url":"https://api.github.com/users/robertjwhitney/following{/other_user}","gists_url":"https://api.github.com/users/robertjwhitney/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjwhitney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjwhitney/subscriptions","organizations_url":"https://api.github.com/users/robertjwhitney/orgs","repos_url":"https://api.github.com/users/robertjwhitney/repos","events_url":"https://api.github.com/users/robertjwhitney/events{/privacy}","received_events_url":"https://api.github.com/users/robertjwhitney/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-02-03T19:47:33Z","updated_at":"2019-01-03T14:50:12Z","closed_at":"2017-03-01T21:01:45Z","author_association":"NONE","body":"Is this on the roadmap at all? Postgres allows for it, I've seen a couple of issues but no real solutions, one of them even has a solution that _doesn't_ seem to work in it. I'm guessing that it is a serious re-write, but having all users in one schema is probably pretty common, any thoughts?"},"comment":{"url":"https://api.github.com/repos/influitive/apartment/issues/comments/451165027","html_url":"https://github.com/influitive/apartment/issues/397#issuecomment-451165027","issue_url":"https://api.github.com/repos/influitive/apartment/issues/397","id":451165027,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTE2NTAyNw==","user":{"login":"hajder","id":354046,"node_id":"MDQ6VXNlcjM1NDA0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/354046?v=4","gravatar_id":"","url":"https://api.github.com/users/hajder","html_url":"https://github.com/hajder","followers_url":"https://api.github.com/users/hajder/followers","following_url":"https://api.github.com/users/hajder/following{/other_user}","gists_url":"https://api.github.com/users/hajder/gists{/gist_id}","starred_url":"https://api.github.com/users/hajder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajder/subscriptions","organizations_url":"https://api.github.com/users/hajder/orgs","repos_url":"https://api.github.com/users/hajder/repos","events_url":"https://api.github.com/users/hajder/events{/privacy}","received_events_url":"https://api.github.com/users/hajder/received_events","type":"User","site_admin":false},"created_at":"2019-01-03T14:50:12Z","updated_at":"2019-01-03T14:50:12Z","author_association":"NONE","body":"@mikecmpbll this is an issue Apartment should handle. As per DmytroVasin comment on https://github.com/rails/rails/issues/28654, Postgres will omit `public` schema when returning column information because `public` is the default schema. Therefore `schema.rb` omits schema which people try to add as a prefix in their migrations.\r\n\r\nNow, since Apartment runs migrations in other schemas, it should be detecting when `add_foreign_key` refers to a table for a shared model. How can this be Rails' responsibility when migrating schemas is a functionality added by Apartment?\r\n\r\nI will look into how hard would it be to fix it but given that I have zero knowledge of the internals of ActiveRecord I guess I will fail at this."}}
{"actor":{"display_login":"hajder"}}