cubicweb/misc/migration/3.22.1_Any.py
author Julien Cristau <julien.cristau@logilab.fr>
Wed, 14 Jan 2015 13:35:22 +0100
changeset 11185 40e74d6d7e99
parent 11129 97095348b3ee
permissions -rw-r--r--
Add migration helper function to delete entity types faster Bypasses all hooks and (for now) ignores any composite relations.

from os import unlink
from os.path import isfile, join
from cubicweb.cwconfig import CubicWebConfiguration as cwcfg

regdir = cwcfg.instances_dir()

if isfile(join(regdir, 'startorder')):
    if confirm('The startorder file is not used anymore in Cubicweb 3.22. '
               'Should I delete it?',
               shell=False, pdb=False):
        unlink(join(regdir, 'startorder'))