Index: openacs-4/packages/acs-content-repository/www/doc/tutorial.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/tutorial.adp,v diff -u -r1.6.2.4 -r1.6.2.5 --- openacs-4/packages/acs-content-repository/www/doc/tutorial.adp 13 Jul 2023 12:47:28 -0000 1.6.2.4 +++ openacs-4/packages/acs-content-repository/www/doc/tutorial.adp 2 Sep 2024 09:40:20 -0000 1.6.2.5 @@ -2,6 +2,10 @@ {/doc/acs-content-repository/ {ACS Content Repository}} {ACS Content Repository Tutorial} ACS Content Repository Tutorial +

How to use the content repository

by Jade @@ -49,8 +53,7 @@ Title Description Task Number - - +

Overview

First of all, let's get some terminology out of the way. Columns of a table are referred to as attributes in @@ -72,8 +75,7 @@ Title - want versions Description - want versions Task Number - do NOT want versions - - +

Define tables

You will have two tables: one with versioned attributes, and one without versioned attributes.

@@ -100,8 +102,7 @@ description varchar(4000) ); - - +

Unversioned portion:

             create table pm_tasks (
@@ -115,8 +116,7 @@
             task_number
             integer
             )
-          
-
+

One thing you have to be careful of when creating these tables is that there are no columns that have the same names as any of the columns in the cr_items and cr_revisions @@ -154,8 +154,7 @@ 'task_id', -- id_column 'content_revision.revision_name' ); - - +

You then need to add in all the attributes, so that the content repository can do some magic things behind the scenes. The content repository doesn't know about what's inside of the @@ -196,8 +195,7 @@ null, -- default value 'numeric' -- column_spec ); - - +

Side effect: once you've created the content type, the content repository creates a view for you called @@ -292,8 +290,7 @@ null, null, 'integer constraint pm_project_comp_fk references organizations' -); - +); I have no idea of whether or not that is supposed to be legal, but I believe it works. Jun was the one who originally talked about