Forum OpenACS Development: Re: More worker bee jobs
I also recently had a need for a 'soft delete'. Imagine your data is stored in the myobject table. I needed to upgrade the datamodel, but I wanted the data. column types were changing, so I couldn't do it in place. So I created myobject_tmp using the new datamodel, and selected the data into this table.
The soft delete dropped the myobject table, but left the data in acs_objects, then I recreate the table and other stuff with the regular, upgraded, create script and reload the data.
I may not have needed to do it, but one attribute was varchar and needed to be text. I also added a few not null attributes. I thought by the time I figured that out, for several tables, I could write the save/restore script. Then a few days later I made more changes and only spent a few minutes on the save/restore.
I think this also points to the fact that developing with real data can make you realize shortcomings pretty quickly.