chore: v2.8.67 — remove user chat and drop its data
The chat_* tables are dropped at start, and <data dir>/chat/ (its uploads) is deleted.
This commit is contained in:
@@ -1854,6 +1854,22 @@ try {
|
||||
db.prepare("ALTER TABLE dashboard_runs ADD COLUMN chat_token_hash TEXT").run();
|
||||
}
|
||||
|
||||
// v2.8.65–2.8.66 shipped a chat between users (chat_* tables, uploads under
|
||||
// <data dir>/chat/); it was removed in v2.8.67, and its data goes with it.
|
||||
try {
|
||||
db.exec(`
|
||||
DROP TABLE IF EXISTS chat_files;
|
||||
DROP TABLE IF EXISTS chat_messages;
|
||||
DROP TABLE IF EXISTS chat_members;
|
||||
DROP TABLE IF EXISTS chat_rooms;
|
||||
`);
|
||||
if (!process.env.DASHBOARD_DB_PATH) {
|
||||
fs.rmSync(path.join(getDataDir(), "chat"), { recursive: true, force: true });
|
||||
}
|
||||
} catch {
|
||||
/* best effort: a leftover is unused */
|
||||
}
|
||||
|
||||
// Server mode: whose browser a push subscription is (`users.id`); NULL in
|
||||
// local mode. A user's notifications go only to their own subscriptions.
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user