{"action":"created","issue":{"url":"https://api.github.com/repos/influitive/apartment/issues/264","labels_url":"https://api.github.com/repos/influitive/apartment/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/influitive/apartment/issues/264/comments","events_url":"https://api.github.com/repos/influitive/apartment/issues/264/events","html_url":"https://github.com/influitive/apartment/issues/264","id":109766452,"number":264,"title":"transactions and different db servers","user":{"login":"apneadiving","id":247583,"avatar_url":"https://avatars.githubusercontent.com/u/247583?v=3","gravatar_id":"","url":"https://api.github.com/users/apneadiving","html_url":"https://github.com/apneadiving","followers_url":"https://api.github.com/users/apneadiving/followers","following_url":"https://api.github.com/users/apneadiving/following{/other_user}","gists_url":"https://api.github.com/users/apneadiving/gists{/gist_id}","starred_url":"https://api.github.com/users/apneadiving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apneadiving/subscriptions","organizations_url":"https://api.github.com/users/apneadiving/orgs","repos_url":"https://api.github.com/users/apneadiving/repos","events_url":"https://api.github.com/users/apneadiving/events{/privacy}","received_events_url":"https://api.github.com/users/apneadiving/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-05T10:07:29Z","updated_at":"2015-10-06T13:28:15Z","closed_at":null,"body":"Hi and thanks for the gem :)\r\n\r\nHere are some questions I have concerning its use. Please be aware it would be possible to see them as a freelancing mission.\r\n\r\n## Store tenants in different databases servers\r\n\r\nIn the current state of the gem, it seems the assumption is that all tenants are stored in the same db server. Am I right to assume this? Is it planned to support different servers?\r\n\r\n## Cross tenant transactions\r\nI realized transactions work fine whenever ran across different schemas of the same db. \r\n\r\nBut I cant make them work whenever tenants are in different db (`undefined method 'rollback' for #<ActiveRecord::ConnectionAdapters::ClosedTransaction:0x007ffef036a320>`).\r\n\r\nCould you please provide some guidance?\r\n\r\nThanks in advance"},"comment":{"url":"https://api.github.com/repos/influitive/apartment/issues/comments/145855921","html_url":"https://github.com/influitive/apartment/issues/264#issuecomment-145855921","issue_url":"https://api.github.com/repos/influitive/apartment/issues/264","id":145855921,"user":{"login":"apneadiving","id":247583,"avatar_url":"https://avatars.githubusercontent.com/u/247583?v=3","gravatar_id":"","url":"https://api.github.com/users/apneadiving","html_url":"https://github.com/apneadiving","followers_url":"https://api.github.com/users/apneadiving/followers","following_url":"https://api.github.com/users/apneadiving/following{/other_user}","gists_url":"https://api.github.com/users/apneadiving/gists{/gist_id}","starred_url":"https://api.github.com/users/apneadiving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apneadiving/subscriptions","organizations_url":"https://api.github.com/users/apneadiving/orgs","repos_url":"https://api.github.com/users/apneadiving/repos","events_url":"https://api.github.com/users/apneadiving/events{/privacy}","received_events_url":"https://api.github.com/users/apneadiving/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T13:28:15Z","updated_at":"2015-10-06T13:28:15Z","body":"Actually only the `Apartment::Tenant.create` public api would have to change changed.\r\n\r\nDoing your way, we'd simply not need additional config, and we'd have:\r\n\r\n1- I guess we still should check `use_schemas` is false if `tenant_names` is a `Hash`\r\n2, 3 - its just internal actually\r\n6 - api change still needed, maybe `Apartment::Tenant.create(tenant_name: db_config_hash)`"}}