Added model relationships. Added event type db migration.