We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eea3d1a commit 55baefeCopy full SHA for 55baefe
src/parser/mysql.ts
@@ -36,6 +36,11 @@ async function getTableNames(
36
): Promise<string[]> {
37
const query = await knex.raw(`show tables from \`${databaseName}\``);
38
const [res] = await query;
39
+ if (!res) {
40
+ console.warn(`no tables in database ${databaseName}`);
41
+ return [];
42
+ }
43
+
44
const key = Object.keys(res[0])[0];
45
return res.map((r: any) => r[key]);
46
}
0 commit comments