Forum OpenACS Q&A: Re: loading new data model

Collapse
2: Re: loading new data model (response to 1)
Posted by Ola Hansson on
One file must be named "yourpackagekey-create.sql" in order for the APM to react. Similarly, if you have drop scripts, one of them must be "yourpackagekey-drop.sql". The create file usually doesn't contain much of interest. What it usually does contain is stuff like:

/i yourpackagekey-tables-create.sql
/i yourpackagekey-packages-create.sql

on PostgreSQL ... or

@ yourpackagekey-tables-create.sql
@ yourpackagekey-packages-create.sql

on Oracle.

These lines will pull in the scripts that actually do something - but I'm sure you knew that part already.

After you have renamed the file, you should watch/reload the files of your package or restart the server.

BTW, Sometimes you see something like "@@ blah.sql", i.e., two @s instead of just one ... Can someone tell me what the difference is? I tried to Google but I couldn't find an answer.

/Ola