Skip to content

Build your personal knowledge base with Trilium Notes

feat(server/session): update database to hold session information

Elian Doranec39667cbac4
diff --git a/apps/server/src/assets/db/migrations/0231__session_store.sql b/apps/server/src/assets/db/migrations/0231__session_store.sql
new file mode 100644
index 0000000000..de245d25c3
--- /dev/null
+++ b/apps/server/src/assets/db/migrations/0231__session_store.sql
@@ -0,0 +1,5 @@
+CREATE TABLE IF NOT EXISTS sessions (
+ id TEXT PRIMARY KEY,
+ data TEXT,
+ expires INTEGER
+);
\ No newline at end of file
diff --git a/apps/server/src/assets/db/schema.sql b/apps/server/src/assets/db/schema.sql
index 29b749d89c..be21bcc3d4 100644
--- a/apps/server/src/assets/db/schema.sql
+++ b/apps/server/src/assets/db/schema.sql
@@ -187,3 +187,9 @@ CREATE TABLE IF NOT EXISTS "embedding_providers" (
"dateModified" TEXT NOT NULL,
"utcDateModified" TEXT NOT NULL
);
+
+CREATE TABLE IF NOT EXISTS sessions (
+ id TEXT PRIMARY KEY,
+ data TEXT,
+ expires INTEGER
+);
diff --git a/apps/server/src/services/app_info.ts b/apps/server/src/services/app_info.ts
index 60b453f9db..7f70f8bcd6 100644
--- a/apps/server/src/services/app_info.ts
+++ b/apps/server/src/services/app_info.ts
@@ -3,7 +3,7 @@ import build from "./build.js";
import packageJson from "../../package.json" with { type: "json" };
import dataDir from "./data_dir.js";
-const APP_DB_VERSION = 230;
+const APP_DB_VERSION = 231;
const SYNC_VERSION = 35;
const CLIPPER_PROTOCOL_VERSION = "1.0";