safely delete index
explicate database dependencies

This was implicit before through `db.serialize`.