v0.8.6 pin bug fixes

This commit is contained in:
2026-03-13 11:27:11 -04:00
parent 022cbd41ea
commit 6d435844c9
5 changed files with 16 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "jama-backend",
"version": "0.8.5",
"version": "0.8.6",
"description": "TeamChat backend server",
"main": "src/index.js",
"scripts": {

View File

@@ -128,6 +128,18 @@ function initDb() {
PRIMARY KEY (user_id, device),
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS push_subscriptions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
endpoint TEXT NOT NULL,
p256dh TEXT NOT NULL,
auth TEXT NOT NULL,
device TEXT NOT NULL DEFAULT 'desktop',
created_at TEXT NOT NULL DEFAULT (datetime('now')),
UNIQUE(user_id, device),
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
`);
// Initialize default settings