fix(snippets): repair missing note column on SQLite upgrades (#1541)

This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-10-03 21:02:04 +08:00
1 parent d3568e484d
commit 117e125d55
3 files changed
+78

No files matched your search

+2
View File
@@ -1,3 +1,4 @@
import { repairSnippetsNoteColumn } from "../../upgrade/snippets-schema-migration.js";
import { getErrorMessage } from "../../utils/error-message.js";
import { drizzle } from "drizzle-orm/better-sqlite3";
import Database from "better-sqlite3";
@@ -782,6 +783,7 @@ const relaxPluginGrantGrantedBy = () => {
};
const migrateSchema = () => {
repairSnippetsNoteColumn(sqlite);
addColumnIfNotExists("user_preferences", "theme", "TEXT");
addColumnIfNotExists("user_preferences", "font_size", "TEXT");
addColumnIfNotExists("user_preferences", "accent_color", "TEXT");