migration/1.0.4_Any.py
author Julien Cristau <julien.cristau@logilab.fr>
Fri, 06 Jun 2014 14:10:19 +0200
changeset 1531 613f39518d8f
parent 80 8abb3d6ee0a1
permissions -rw-r--r--
[lgp] refresh log in the lgp log handler (closes #4002751) Should give us more progress information while things are building.

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')