fix(数据库迁移): 修正非SQLite数据库的snList列默认值定义

This commit is contained in:
zhang1106
2026-03-05 10:14:29 +08:00
parent 6db0e69c77
commit 8e13e76e75
+1 -1
View File
@@ -384,7 +384,7 @@ async function migrateSnList() {
for (const table of tables) {
if (await tableExists(table)) {
const columnDef = dbDialect === 'sqlite' ? "TEXT DEFAULT '[]'" : "JSON DEFAULT '[]'";
const columnDef = dbDialect === 'sqlite' ? "TEXT DEFAULT '[]'" : "JSON";
await addColumnIfNotExists(table, 'snList', columnDef);
} else {
console.log(` ${table} 表不存在,跳过`);