Forum OpenACS Q&A: Recreating blank data for a module

Collapse
Posted by Piyush Shah on
I'd like to effectively blank out the data tables for a module (in
this case, ecommerce) in a running OpenACS installation without
affecting the other system data (users, etc). Trying to DELETE ... in
psql doesn't work since there are now test orders and this would
affect the integrity. I would appreciate recommendations as to how to
best to this.

I was thinking about creating a new ACS PG database and then just
copying over the relevant files (in this case ec_*) from the new
directory, but this is probably not the right way to do it?

Collapse
Posted by Nathan Reeves on
This answer has not been tested in any way, but...

The easiest way would be to edit the wwwdocssqlload-data-model.sql so it doesn't load the ecommerce sql file.  In theory you should just have to remove the reference to ecommerce.sql as that should pretty much contain everything to do with ec_*.

HTH

Collapse
Posted by Piyush Shah on
Thanks Nathan. Actually what I needed to do is the inverse of what you've suggested (want to blank just the ec* data and keep the rest). I went ahead and did what I mentioned in my initial post (created a new database and copied the ec* files over to the current database directory) and it worked (except for wiping out my single product template which is held in one of the tables and not in static file - not to worry though - still in test mode). I still think this is not such a clean procedure. I think I need to spend more time with the Postgres docs to come up with alternatives and hopefully someone also has a better method.