migration/1.0.4_Any.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 21 Oct 2010 18:01:10 +0200
changeset 716 448d9fb3ae71
parent 80 8abb3d6ee0a1
permissions -rw-r--r--
#1347584: when used as a tracker extension, should grant staff group the right to add/update repositories

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