perf: 修改sql升级语句,兼容mysql5.7

This commit is contained in:
xiaojunnuo
2026-02-09 18:18:19 +08:00
parent d286c040a5
commit 02f89a9c9d
11 changed files with 60 additions and 14 deletions
+2
View File
@@ -75,6 +75,8 @@ function transformMysql() {
pgSql = pgSql.replaceAll(/text/g, 'longtext');
//双引号 替换成反引号
pgSql = pgSql.replaceAll(/"/g, '`');
//create table if not exists
pgSql = pgSql.replaceAll(/CREATE TABLE ([ ]+)`/g, 'CREATE TABLE IF NOT EXISTS `');
fs.writeFileSync(`./migration-mysql/${notFile}`, pgSql);
}