Before replacing all $db's