bobobase_modification_time and .zexp
import/export obviously doesn't preserve time stamps (i.e. bobobase_modification_time). This is unfortunate for any content which depends on those timestamps. How do you people out there solve this problem when it comes to moving content from different Zope installations into a single one?
Wolfgang Strobl wrote:
import/export obviously doesn't preserve time stamps (i.e. bobobase_modification_time). This is unfortunate for any content which depends on those timestamps. How do you people out there solve this problem when it comes to moving content from different Zope installations into a single one?
I just developed custom document ZClass which basically: - inherits from CatalogAware and DTML Document - contains custom property sheet which contains creationTime attribute (and some others, like meta_keywords or meta_summary) - constains constructor method which sets creationTime to current time. Wherever I need information when the page has been created, I use my creationTime attribute. I do not know how to implement 'modificationTime' attribute (or better: how to change it whenever someone edits or uploads the document). -- http://www.mk.w.pl / Marcin.Kasperski | O kredytach mieszkaniowych: @softax.com.pl | http://www.kupmieszkanie.w.pl/mieszkanie_kredyt @bigfoot.com \
On 17 Oct 2000, 20:18 Marcin Kasperski wrote:
Wolfgang Strobl wrote:
import/export obviously doesn't preserve time stamps (i.e. bobobase_modification_time). This is unfortunate for any content which depends on those timestamps. How do you people out there solve this problem when it comes to moving content from different Zope installations into a single one?
I just developed custom document ZClass which basically: - inherits from CatalogAware and DTML Document - contains custom property sheet which contains creationTime attribute (and some others, like meta_keywords or meta_summary) - constains constructor method which sets creationTime to current time.
Wherever I need information when the page has been created, I use my creationTime attribute.
Sure. For your own creations it's somewhat easier, just create your own timestamps. But what about existing content. Say: what if you have a Yihawdirectory which has grown for a while, plus a collection of Zwikis scattered over various Zopes, which I want to move into a a single new, but already existing on a bigger, greater and better server?
I do not know how to implement 'modificationTime' attribute (or better: how to change it whenever someone edits or uploads the document).
Well, for a moment I considered hacking ExportImport.py, but it's not obvious. That's why I'm asking whether somebody perhaps already has solved the problem. There is the option of stripping all the various data.fs and combining them via mounting, but this is far from elegant, if it works at all. -- o ( Wolfgang.Strobl@gmd.de (+49 2241) 14-2394 /\ * GMD mbH #include _`\ `_<=== Schloss Birlinghoven, <std.disclaimer> __(_)/_(_)___.-._ 53754 Sankt Augustin, Germany ________________
On Tue, 17 Oct 2000 21:25:18 +0200, "Wolfgang Strobl" <ws@gmd.de> wrote:
Wherever I need information when the page has been created, I use my creationTime attribute.
Sure. For your own creations it's somewhat easier, just create your own timestamps. But what about existing content. Say: what if you have a Yihawdirectory which has grown for a while, plus a collection of Zwikis scattered over various Zopes, which I want to move into a a single new, but already existing on a bigger, greater and better server?
Zopes existing 'find' mechanism lets you apply an operation to all the objects that it matches - use that to patch your existing objects to the new schema.
I do not know how to implement 'modificationTime' attribute (or better: how to change it whenever someone edits or uploads the document).
Well, for a moment I considered hacking ExportImport.py, but it's not obvious. That's why I'm asking whether somebody perhaps already has solved the problem.
There is the option of stripping all the various data.fs and combining them via mounting, but this is far from elegant, if it works at all.
bobobase_modification_time returns the timestamp of the transaction containing the most recent copy of the object. timestamping is fundamental to ZODB. For this alone to work you will need to keep the objects in separate data.fs files forever. Toby Dickenson tdickenson@geminidataloggers.com
participants (3)
-
Marcin Kasperski -
Toby Dickenson -
Wolfgang Strobl