From 4df7083562aab53c55bc50c632afcb4d1d4df0fb Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Mon, 14 Sep 2020 10:56:58 +0800 Subject: [PATCH] fix(mysql): fix auto create table typo --- packages/plugin-mysql/src/database.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-mysql/src/database.ts b/packages/plugin-mysql/src/database.ts index 9de2ea8f55..6635953b89 100644 --- a/packages/plugin-mysql/src/database.ts +++ b/packages/plugin-mysql/src/database.ts @@ -55,7 +55,7 @@ export default class MysqlDatabase { if (names.has(name)) return const table = MysqlDatabase.tables[name] const cols = Object.keys(table).map((key) => { - if (+key * 0 === +key) return table[key] + if (+key * 0 === 0) return table[key] return `\`${key}\` ${table[key]}` }) logger.info('auto creating table %c', name)