add automatic creation of indexes for events table