diff options
| author | 2023-01-26 08:13:38 +0100 | |
|---|---|---|
| committer | 2023-01-26 08:13:38 +0100 | |
| commit | 2f027545226eca238a6a80021cb3ac0e60b51696 (patch) | |
| tree | 905d0926324ae260952294d6a2a3263ea6ab527b /app/SQL/install.sql.sqlite.php | |
| parent | 1c4b328ae14ce94c56171eb28ca4dc0c665051f4 (diff) | |
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
Diffstat (limited to 'app/SQL/install.sql.sqlite.php')
| -rw-r--r-- | app/SQL/install.sql.sqlite.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/SQL/install.sql.sqlite.php b/app/SQL/install.sql.sqlite.php index ccf256d6a..8762b33eb 100644 --- a/app/SQL/install.sql.sqlite.php +++ b/app/SQL/install.sql.sqlite.php @@ -16,11 +16,11 @@ CREATE TABLE IF NOT EXISTS `category` ( CREATE TABLE IF NOT EXISTS `feed` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - `url` VARCHAR(511) NOT NULL, + `url` VARCHAR(32768) NOT NULL, `kind` SMALLINT DEFAULT 0, -- 1.20.0 `category` INTEGER DEFAULT 0, -- 1.20.0 `name` VARCHAR(255) NOT NULL, - `website` VARCHAR(255), + `website` VARCHAR(32768), `description` TEXT, `lastUpdate` INT(11) DEFAULT 0, -- Until year 2038 `priority` TINYINT(2) NOT NULL DEFAULT 10, @@ -31,8 +31,7 @@ CREATE TABLE IF NOT EXISTS `feed` ( `attributes` TEXT, -- v1.11.0 `cache_nbEntries` INT DEFAULT 0, `cache_nbUnreads` INT DEFAULT 0, - FOREIGN KEY (`category`) REFERENCES `category`(`id`) ON DELETE SET NULL ON UPDATE CASCADE, - UNIQUE (`url`) + FOREIGN KEY (`category`) REFERENCES `category`(`id`) ON DELETE SET NULL ON UPDATE CASCADE ); CREATE INDEX IF NOT EXISTS feed_name_index ON `feed`(`name`); CREATE INDEX IF NOT EXISTS feed_priority_index ON `feed`(`priority`); |
