changed database to auto_increment and event type to enum