Closed tflorac closed 4 years ago
supportsUndo
is a method of IStorageUndoable. RelStorage only implements IStorageUndoable
when keep-history
is true. It seems that zodbupdate incorrectly always assumes that method is available; it should be checking whether IStorageUndoable.providedBy(self.storage)
. It looks like the full test should be
elif (IStorageIteration.providedBy(storage)
and (not IStorageUndoable.providedBy(self.storage)
or not storage.supportsUndo())):
…
Does that take care of it?
Thanks for you reply! Actually if we skip this test zodbupdate exist saying that it doesn't know how to handle this kind of storage!! :(
I'm not suggesting skipping the test, I'm suggesting modifying it like I wrote above. That should pass for a history-free RelStorage.
A history-preserving RelStorage doesn't appear to be supported by zodbupdate at this time. It needs #389
Ho, sorry, I misread! :( I'm going to check...
Yes, I modified zodbupdate code as you suggested and actually it seems to work! Many thanks, Thierry
OK, I submitted a match to zodbupdate repository...!
With https://github.com/zopefoundation/zodbupdate/pull/39 and #389, RelStorage is usable and tested with zodbupdate in both history-free and history-preserving configuratinos.
Hi, I would like to update a database schema using RelStorage 3.0.1 with zodbupdate (https://pypi.org/project/zodbupdate/). But I get an exception:
I have tried to modify zodbupdate to avoid this call, but then an error message says that zodbupdate doesn't know how to handle this storage!
So is there any way to update my schema with zodbupdate (or any other method), without converting my database from and to a classic FileStorage?
Best regards, Thierry