Date index for Mar 2003
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [achievo] SQL schema evolution issue
Hi,
Peter C. Verhage wrote:
attributes (or replace/remove existing ones). The overloader feature
allows you to create a completely new node that extends the existing
(customer) node. It's then not only possible to add/replace/remove
attributes but it's also possible to overload every method of the node.
To give a short example of this feature, create the following module:
<?php
$modifiers[] = "customer"; // This module modifies the customer node.
class mod_myextensions extends atkModule
{
function customer_modifier(&$node)
{
$node->add(new atkAttribute("taxcode"));
}
}
?>
Put this code in module.inc in a directory named myextensions (or
whatever you name your module). Then, in config.inc.php, put this line:
module("myextensions", "../path/to/your/modules/myextensions/");
code base (except for adding the module to the config.modules.inc file).
No, don't add them to config.modules.inc. Put them in config.inc.php, so
you only have to migrate your config.inc.php file when a new Achievo is
released.
about that. In fact the installation script can even automatically
create the columns in the table(s) for the attributes you've added using
the modifier or overloader!
Don't give away all the fun yet :)
Greetings,
Ivo
--
Ivo Jansch <ivo dot
ibuildings.nl BV - information technology
http://www.ibuildings.nl