Forum OpenACS Q&A: Re: Question regarding XoTcl-Tutorial for OpenACS

Collapse
Posted by Gustaf Neumann on
The tutorial shows how to create XOTcl classes from the datamodel and vice versa, but does not address changes in the data model (adding attributes, changing attribute types, ...), data migration, etc.

For creating acs_types from XOTcl classes, everything needed in OpenACS is created automatically, where "everything" includes among other things the views *i and *r and the function *f (e.g. xowiki_pagei, ...).

For handling data model changes, i would recommend to check what xowiki does (look at ::xowiki::upgrade_callback in xowiki/tcl/xowiki-callback-procs.tcl). In many situations (just adding some columns), a call to ::xowiki::update_views is sufficient (see e.g. upgrade to 0.56 for a more complex case), maybe for your problem as well.