migration/1.0.4_Any.py
author David Douard <david.douard@logilab.fr>
Thu, 21 May 2015 18:08:58 +0200
changeset 1818 b99983186da6
parent 80 8abb3d6ee0a1
permissions -rw-r--r--
Added tag apycot-version-3.2.2, apycot-debian-version-3.2.2-1, 3.2.2, debian/3.2.2-1 for changeset 3c65c9e316bc

rql('DELETE CheckResultLog X')
checkpoint()
drop_attribute('CheckResultLog', 'severity')
add_attribute('CheckResultLog', 'severity')

sql('''CREATE FUNCTION severity_sort_value(text) RETURNS int
    AS 'return {"DEBUG": 0, "INFO": 10, "WARNING": 20, "ERROR": 30, "FATAL": 40}[args[0]]'
    LANGUAGE plpythonu;
''')
checkpoint()

synchronize_eschema('CheckResultLog')
synchronize_eschema('CheckResult')