migration/4.0.0_Any.py
author David Douard <david.douard@logilab.fr>
Fri, 14 Nov 2014 12:31:47 +0100
changeset 1776 f1a23fc56270
parent 1773 35a2edaa84e5
child 1620 90d134d66ab9
permissions -rw-r--r--
[narval] lgp and pkginfo now lives in logilab-packaging And pkginfo is in fact mandatory for the python checkers. Also ensure lgp checkers are properly disabled if lgp is not found.

from itertools import chain

drop_attribute('ProjectEnvironment', 'vcs_path')

add_relation_definition('Repository', 'checkout_recipe', 'Recipe')
add_relation_definition('ProjectEnvironment', 'setup_recipe', 'Recipe')


sync_schema_props_perms(schema['TestExecution'].rdef('branch'))

# rename apycot recipes
for oldname, newname in ((u'apycot.recipe.full', u'apycot.python.full'),
                         (u'apycot.recipe.quick', u'apycot.python.quick'),
                         ):
    rql('SET R name %(newname)s WHERE R is Recipe, R name %(oldname)s',
        {'newname': newname, 'oldname': oldname})
commit()

# add new or update basic recipes
from cubes.apycot import recipes
recipes.create_recipes(session, update=True)