remove upgrade metadata, add database indexing