Forum OpenACS Improvement Proposals (TIPs): Re: TIP #132 Plans to address storage_type problem in CR

Collapse
Posted by Dave Bauer on
Why is it useful?

You state it causes serious problems and it corrupts the item. It seems MUCH simpler to use the already working code to just keep all revisions of an item the same storage type.

If you want to move storage type to cr_revisions, then I fully support revisions with different storage types, but not until then.

I am in this discussion on Dave's side. The only interesting use-case use-case i see currently is that changing the storage type could provide an easy means for a developer to revise in a release an earlier decision about the storage type. This ability could save the developer from the need to write a change script. I don't see the need e.g. for an end-user to say "please store this revision as file or text".

From the data-model i would also conclude that the original intention of the design was not to change the type during revisions, so the current *interface* has a bug. It seems quite natural for me to save uploaded files with the storage type file and input strings of a form as strings (the lob type is a candidate for deletion in my opinion). Providing an interface where one adds once a file and once a string is unusual. If one needs such a feature, it could be easily provided with a custom type, using storage type "file" and a custom attribute "content" of type text.

So, why not keep things simple and remove essentially the storage type option from content::revision::new, and mark content::revision::update_content as private for the time being. This change is essentially a bug fix.

If there is indeed in the future a strong reason for making the cr even more powerful by allowing to switching between storage types, this should be tipped again.

-gustaf neumann