We've moved discussions to Discord

Multitenancy with subdomain

Rafik Mrabet
I believe the subdomain attribute of the accounts table should be made unique true. Currently in the DB Schema there is no uniqueness condition for the subdomain or domain.
Can someone think of a use case where different accounts can have the same subdomain?

In set_current_request_details.rb, there is a method for finding an account by subdomain, so it doesn't make sense to allow different accounts to have the same subdomain. I believe the same applies to the domain.

Active Record validations of uniqueness should also be added to the Account model file.
Chris Oliver
Yeah, they can probably be unique. 👍
Notifications
You’re not receiving notifications from this thread.