Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HOW TO Upgrade a Plomino database from a GenericSetup upgrade step
If you export your DB design to a local folder of your site specific skin product, you can update the corresponding database from portal_setup easily.
Let's assume your DB design is exported in your skin product in a folder named ./db.
<configure xmlns="http://namespaces.zope.org/zope" xmlns:genericsetup="http://namespaces.zope.org/genericsetup" i18n_domain="plone"> <genericsetup:upgradeStep title="Upgrade step to refresh Plomino db design" description="Upgrade step to refresh Plomino db design" source="*" destination="*" handler=".upgrades.update_db_design" profile="my.skin:default" /> </configure>
def update_db_design(context): db = context.my_folder.mydb db.importDesignFromXML(from_folder='./src/my.skin/my/skin/db/mydb')
Now, if you go to ZMI / portal_setup / Upgrades, and you pick your skin products in the list, you will get a step to refresh your db design.