{"action":"created","issue":{"url":"https://api.github.com/repos/influitive/apartment/issues/318","repository_url":"https://api.github.com/repos/influitive/apartment","labels_url":"https://api.github.com/repos/influitive/apartment/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/influitive/apartment/issues/318/comments","events_url":"https://api.github.com/repos/influitive/apartment/issues/318/events","html_url":"https://github.com/influitive/apartment/issues/318","id":156265867,"number":318,"title":"Multiple tenants creation","user":{"login":"waghanza","id":1440729,"avatar_url":"https://avatars.githubusercontent.com/u/1440729?v=3","gravatar_id":"","url":"https://api.github.com/users/waghanza","html_url":"https://github.com/waghanza","followers_url":"https://api.github.com/users/waghanza/followers","following_url":"https://api.github.com/users/waghanza/following{/other_user}","gists_url":"https://api.github.com/users/waghanza/gists{/gist_id}","starred_url":"https://api.github.com/users/waghanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waghanza/subscriptions","organizations_url":"https://api.github.com/users/waghanza/orgs","repos_url":"https://api.github.com/users/waghanza/repos","events_url":"https://api.github.com/users/waghanza/events{/privacy}","received_events_url":"https://api.github.com/users/waghanza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-23T12:11:09Z","updated_at":"2016-05-24T12:48:12Z","closed_at":null,"body":"Hi all,\r\n\r\nI've a `rails` app  with **100** tenants (at least for now).\r\nI want to create them in a loop (of **100** items)\r\n~~~ruby\r\nCompany.all.each do |c|\r\n  Apartment::Tenant.create(c.tenant)\r\nend\r\n~~~\r\nit appears that I use **hstore** extension (created in a **persitant_schema**).\r\nHowever, I can create my tenants.\r\nFirst tenant created successfully \r\n~~~ruby\r\n   (1.4ms)  CREATE SCHEMA \"xxxxxxxxxxxxxxxxxx\"\r\n  SQL (0.4ms)  CREATE EXTENSION IF NOT EXISTS \"plpgsql\"\r\n  SQL (24.6ms)  CREATE EXTENSION IF NOT EXISTS \"hstore\"\r\n  ....\r\n  (2.3ms)  COMMIT\r\n~~~\r\nbut second creation fails\r\n~~~ruby\r\n   (2.3ms)  CREATE SCHEMA \"yyyyyyyyyyyyyyyyyyyyyy\"\r\n  SQL (0.2ms)  CREATE EXTENSION IF NOT EXISTS \"plpgsql\"\r\n  SQL (0.2ms)  CREATE EXTENSION IF NOT EXISTS \"hstore\"\r\n  ....\r\n~~~\r\nuntill I have\r\n**ActiveRecord::StatementInvalid: PG::UndefinedObject: ERREUR:  le type « hstore » n'existe pas**\r\n\r\nDoes somebody has this error ?\r\n"},"comment":{"url":"https://api.github.com/repos/influitive/apartment/issues/comments/221257938","html_url":"https://github.com/influitive/apartment/issues/318#issuecomment-221257938","issue_url":"https://api.github.com/repos/influitive/apartment/issues/318","id":221257938,"user":{"login":"bradrobertson","id":190353,"avatar_url":"https://avatars.githubusercontent.com/u/190353?v=3","gravatar_id":"","url":"https://api.github.com/users/bradrobertson","html_url":"https://github.com/bradrobertson","followers_url":"https://api.github.com/users/bradrobertson/followers","following_url":"https://api.github.com/users/bradrobertson/following{/other_user}","gists_url":"https://api.github.com/users/bradrobertson/gists{/gist_id}","starred_url":"https://api.github.com/users/bradrobertson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradrobertson/subscriptions","organizations_url":"https://api.github.com/users/bradrobertson/orgs","repos_url":"https://api.github.com/users/bradrobertson/repos","events_url":"https://api.github.com/users/bradrobertson/events{/privacy}","received_events_url":"https://api.github.com/users/bradrobertson/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T12:48:12Z","updated_at":"2016-05-24T12:48:12Z","body":"That's odd. We also use `hstore`. What version of ActiveRecord are you using?"}}
{"actor":{"display_login":"bradrobertson"}}