"could not find column" error

CPAS Forum (Inactive)
"could not find column" error <1374>  2006-08-17 00:10
Status: Closed
 
i tried to add another field in the demo module but it seems that i get this error "could not find column".
So do i have to configure anything?


 
 
Peter responded:  2006-08-21 13:53
I suspect you are missing the field in the demo.xml file under demo/src/cpasProperties. That is where cpas loads table and column metadata from, on module startup.

For completeness, here are the steps we go through to add a field to a table in a released module

  1. add an incremental postgres script file named with a new version number that contains an ALTER TABLE to add the column. for example, name the file "demo-1.00-1.01.sql" if this is the first change after the 1.00 release. goes in webapp/demo/scripts/postgresql/
  2. make a sqlserver version of the same script, with same file name, and save in webapp/demo/scripts/sql server/
  3. add field to column list in demo/src/cpasProperties/demo.xml
  4. bump the module version number in the contructor of DemoModule() from 1.00 to 1.01
this will cause the incremental scripts to be run on startup.

if you haven't released a module it is simpler because you don't need to bump the version number or create a separate script file. there are still two sql scipts and one .xml file to change.

 
adam responded:  2007-01-04 09:21