Forum OpenACS Q&A: Re: New content repository documentation

Collapse
Posted by Jade Rubick on
I've added in a section in my content repository documents on adding in attributes (extra columns) through this syntax:

select content_type__create_attribute(
        'pm_project',
        'customer_id',
        'integer',
        'Customer',
        'Customers',
        null,
        null,
        'integer constraint pm_project_customer_fk references organizations'
);

instead of using alter table add column...

Note that by putting the foreign key reference in the column spec (the last argument), I was able to have legitimate foreign key references. I'm not sure if this is supposed to be supported or not, but it works.