Fixed missing indexes and views on empty DBs