Added the database to events.py