More work on db schema; all except FTS indices.