On 20.04.2010 15:52, sunew wrote:
The key migth change over time, in case of a new module being
installed. This accounts for experiences of 'missing' data. A new key
take over, so data can be stored under several annotation keys. Which
is the most current? The last one to be imported - is it possible in
some way to check for that?
On Apr 20, 1:17 pm, Asko Soukka<asko.sou...@jyu.fi> wrote:
So, for every payable:
1. iterate through all existing annotation keys
2. pick the PersistentOptions key, which has the most stored options
3. store those annotations (key, value -pairs) temporarily
4. iterate through all known PersistentOptions key/interface-pairs
5. if an interface can be imported, store its annotations with
respective annotation key (only if proper key, value -pairs were
retrieved earlier)
...
agreed.
Hi,
I committed an example of migrating payables using GenericSetup upgrade
step into my experimental branch:
http://code.google.com/p/getpaid/source/detail?r=3493
At first, there's some boilerplate code to register an upgradeStep from
the current Products.PloneGetPaid profile version 0.9.2 to version 1
(AFAIK, the current Plone-convention [>= Plone 3.1] is to NOT mix the
product version number and GS profile version number).
This boilerplate makes a upgrade button for PloneGetPaid visible on
prefs_install_products_form, which calls the migration code.
Finally, there's some extra boiler plate for also including any GS
profile upgrades using an additional profile and installing it from the
migration code, but since it's currently empty, it can be ignored (thus,
ignore profile 'upgrade0to1', its registration and installation from the
migration code).
Best Regards,
Asko
--
GetPaid for Plone: http://www.plonegetpaid.com (overview info) |
http://code.google.com/p/getpaid (code and issue tracker)
You received this message because you are subscribed to the Google Groups
"getpaid-dev" group.
To post to this group, send email to getpaid-dev@googlegroups.com
To unsubscribe from this group, send email to
getpaid-dev+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/getpaid-dev?hl=en?hl=en