diff --git a/public/index.html b/public/index.html index 5c5b75e..4e37aae 100644 --- a/public/index.html +++ b/public/index.html @@ -144,6 +144,48 @@ +
diff --git a/server.js b/server.js index fc20da6..ec3493c 100644 --- a/server.js +++ b/server.js @@ -334,6 +334,12 @@ if (legacyChatsExist && migrationNeeded.count === 0) { }); } +const personaColumns = db.prepare("PRAGMA table_info(personas)").all(); +const hasCustomFields = personaColumns.some(column => column.name === "custom_fields"); +if (!hasCustomFields) { + db.prepare("ALTER TABLE personas ADD COLUMN custom_fields TEXT").run(); +} + const FileStore = FileStoreFactory(session); app.use(bodyParser.json()); app.use(express.static("public"));