fixed allTables to restrict to current database