fix(数据库迁移): 修正非SQLite数据库的snList列默认值定义
This commit is contained in:
@@ -384,7 +384,7 @@ async function migrateSnList() {
|
|||||||
|
|
||||||
for (const table of tables) {
|
for (const table of tables) {
|
||||||
if (await tableExists(table)) {
|
if (await tableExists(table)) {
|
||||||
const columnDef = dbDialect === 'sqlite' ? "TEXT DEFAULT '[]'" : "JSON DEFAULT '[]'";
|
const columnDef = dbDialect === 'sqlite' ? "TEXT DEFAULT '[]'" : "JSON";
|
||||||
await addColumnIfNotExists(table, 'snList', columnDef);
|
await addColumnIfNotExists(table, 'snList', columnDef);
|
||||||
} else {
|
} else {
|
||||||
console.log(` ${table} 表不存在,跳过`);
|
console.log(` ${table} 表不存在,跳过`);
|
||||||
|
|||||||
Reference in New Issue
Block a user