From 2f027545226eca238a6a80021cb3ac0e60b51696 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 26 Jan 2023 08:13:38 +0100 Subject: Increase max feed URL length and drop unicity (#5038) * Increase max feed URL length and drop unicity #fix https://github.com/FreshRSS/FreshRSS/issues/4338 Drop the unicity constraint on our feed URL. In practice, this did not add much value as identical feeds could have different URLs. And it generated several problems, for instance during renaming or automatic redirections such as from HTTP to HTTPS, with collisions for which we dot not have any elegant handling. I have kept a high limit of 32768 because cURL does not seem to have any limit except memory, which might lead to memory problems. This is the highest server-side value reported by https://www.sistrix.com/ask-sistrix/technical-seo/site-structure/url-length-how-long-can-a-url-be * Same for Web site URL For consistency --- app/SQL/install.sql.pgsql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/SQL/install.sql.pgsql.php') diff --git a/app/SQL/install.sql.pgsql.php b/app/SQL/install.sql.pgsql.php index c4da2afad..00a30a8c7 100644 --- a/app/SQL/install.sql.pgsql.php +++ b/app/SQL/install.sql.pgsql.php @@ -15,11 +15,11 @@ CREATE TABLE IF NOT EXISTS `_category` ( CREATE TABLE IF NOT EXISTS `_feed` ( "id" SERIAL PRIMARY KEY, - "url" VARCHAR(511) UNIQUE NOT NULL, + "url" VARCHAR(32768) NOT NULL, "kind" SMALLINT DEFAULT 0, -- 1.20.0 "category" INT DEFAULT 0, -- 1.20.0 "name" VARCHAR(255) NOT NULL, - "website" VARCHAR(255), + "website" VARCHAR(32768), "description" TEXT, "lastUpdate" INT DEFAULT 0, "priority" SMALLINT NOT NULL DEFAULT 10, -- cgit v1.2.3