reformat sql code
register events using the event id: remove some warnings in PyCharm