Fixes demo database by removing obsolete tables and adding missing fields and indexes.