Forum OpenACS Development: Best way to handle add'l user info?

I have some user data being imported from a different web application.

There is some data that is not in the user model for OACS4.

PhilG's site seems to indicate that the creation of a
"users_extra_info" table is the way to go.  Then make a primary key
constraint against the users table and unique index constraint to
ensure that no key is entered twice.

Is this the best way to go about it, or is there something already in
OACS4 that lets me add more information to the user information?

Collapse
Posted by Janine Ohmer on
I think Philip's reasoning for doing this (though it's been a while since I read it) was to make future upgrades easier, by not changing the existing tables.  However, upgrades have always been such a PITA anyway that I have always just added to the users table (and documented my changes for posterity).  I didn't feel the mythical upgrade benefits were worth having to have an extra join every time I used that new information.

It's possible that in the future upgrades won't be as painful as they have been in the past, and this will become bad advice, but I think upgrading software like this is always pretty hard.  What we have done so far is start with a clean install of the new version and migrate over all our changes;  if you're careful to document them well then it's not all that hard to do.

Collapse
Posted by Don Baccus on
With OpenACS 4 one approach to consider is to extend the users type (i.e. subtype it).  This assumes that existing code that expects the user type properly calls the function that checks to see if the object's of type "user" or some subtype of "user", rather than explicitly check for an exact type match.