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

Collapse
4: Re: loading new data model (response to 1)
Posted by Don Baccus on
Just more info ... if you've added a .sql file and intend to drop and recreate your package instance (or entire OpenACS install) because you're in development, simply adding it to your <foo>-create.sql file is fine, as mentioned above.

If however recreating the package is inconvenient (it has live data, etc) you can either load the SQL file by hand or bump your package version number in the .info file, and add a file named "upgrade/upgrade-<old version>-<new version>.sql" under your sql/postgresql/ directory.  You'd then visit the APM, click on "install packages" and presto! you'll see your package offered labelled "upgrade" rather than "install".  This upgrade file would itself then reference your new .sql file.