change type field to event_type in db_schema