Skip to content

Commit 7151596

Browse files
committed
Fix Undefined Tables If DB Name Includes UpperCase
1 parent d6793be commit 7151596

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mysql-database",
3-
"version": "1.2.7",
3+
"version": "1.2.8",
44
"description": "Easily modify your MySQL database data with easy functions",
55
"main": "index.js",
66
"scripts": {

structures/methods/tables.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
const errors = require('../errors/strings.js');
44

55
module.exports = async function(){
6-
let tables = await this.query(`show tables;`);
7-
return tables.map(m => m["Tables_in_" + this.db.pool.config.connectionConfig.database]);
6+
let tables = await this.query(`SHOW TABLES;`);
7+
return tables.map(m => m["Tables_in_" + this.db.pool.config.connectionConfig.database.toLowerCase()]);
88
}

0 commit comments

Comments
 (0)