Adds per thread databases.