From f6c219ecc27c58fd88d610c16b07f019c7929904 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Sun, 30 Jul 2023 21:05:27 +0530 Subject: Make feed id autoincrement This is necessary to avoid a condition where the most recently added feed is deleted, and a new one subsequently added, after the latest id has been fetched from the database for updating but before the new entries are inserted. In this case, without autoincrement, entries from the deleted feed would be associated with the newly added feed. This fix does not include migration from the old DB schema without the change since this project is not stable yet, but I intend to start including such migrations in perhaps the very next release that alters the database schema. --- static/scripts/auto_refresh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/scripts') diff --git a/static/scripts/auto_refresh.js b/static/scripts/auto_refresh.js index 48af816..5e7223e 100644 --- a/static/scripts/auto_refresh.js +++ b/static/scripts/auto_refresh.js @@ -1,7 +1,7 @@ (() => { const onFrontPage = () => { const searchParams = new URLSearchParams(window.location.search); - let pageNum = searchParams.get("page_num"); + const pageNum = searchParams.get("page_num"); return (pageNum === "1") || (pageNum === null); }; -- cgit v1.2.3-57-g22cb