Extending 'User' Table Best Practice?

8 views
Skip to first unread message

yllum...@gmail.com

unread,
Jun 23, 2011, 9:41:37 AM6/23/11
to Hobo Users
I'm working on an application presently where I have an 'agents' table instead of or in addition to the 'users' table. In this I have some additional fields that need to be tracked beyond the normal 'User' table. These include things such as 'phone1', 'phone2', 'agent_id' and some boolean flags to allow/disallow certain users from doing certain tasks (I assume that I can eliminate these with the Hobo permissions system perhaps).

I was hoping to get some idea of what would be the best path to take in a scenario like this. Is it better to have an additional table that contains these additional attributes or to actually extend the User table? An example would also be appreciated if it would help clarify implementation.


Thanks in advance for the advice,

-George

kevinpfromnm

unread,
Jun 23, 2011, 12:12:34 PM6/23/11
to hobo...@googlegroups.com
Simplest is usually to just add it to the user model.  Unless you need to have multiples of these fields (or multiple users per agent) of course.

ylluminate

unread,
Jun 23, 2011, 1:59:03 PM6/23/11
to Hobo Users
Thanks for that. I was leaning towards this as it seems to be the
cleanest option for the situation.
Reply all
Reply to author
Forward
0 new messages