Forum OpenACS Improvement Proposals (TIPs): TIP #48: (Approved) Make acs_object type and attribute creation mirror content type

Currently, content_type.create_type() and content_type.create_attribute() will create the named type table and attribute columns if they do not exist when the procedures are called.

The equivalent acs_object calls do not.

I'd like to change them so they do, in essence making behavior identical between the two.

Unlike many things I'm contemplating, this little change would require minimal upgrade scripts, just package/function replacements, no munging with tables etc, so would be easy to make.  It would not break any existing code.

The goal is to make the development of higher-level Tcl API that works consistently for CR and base objects possible (i.e. Tcl-based object creation as Barry Brooks and I have been discussing in separate threads).

I could make this change by the end of February at the latest, maybe earlier depending on how busy Rocael keeps me until I go home on Feb 24th.

Collapse
Posted by Dave Bauer on
Approved
As an aside - I like the perl term 'tie' for this concept.
Collapse
Posted by Malte Sussdorff on
approved
If you are going to change the create attribute function can it also be changed to use the acs_object_id_seq instead of acs_attribute_id_seq. I don't think the change would make any difference on new installs and on upgrades the chances of a conflict are small because the object_id_seq number will almost always be much greater acs_attribute_id_seq. By making this change it would be very easy to make acs_attributes acs_objects by just populating the acs_object table.
Ápproved.