chore(db): avoid rowid for blocks and blocklists (#10315)

### Purpose

Noticed "large" autgenerated indices on blocks and blocklists in
https://forum.syncthing.net/t/database-or-disk-is-full-might-be-syncthing-might-be-qnap/24930/7

They both have a primary key and don't need rowids

## Authorship

Your name and email will be added automatically to the AUTHORS file
based on the commit metadata.
This commit is contained in:
bt90
2025-08-29 11:12:39 +02:00
committed by GitHub
parent 7189a3ebff
commit b59443f136

View File

@@ -14,7 +14,7 @@
CREATE TABLE IF NOT EXISTS blocklists (
blocklist_hash BLOB NOT NULL PRIMARY KEY,
blprotobuf BLOB NOT NULL
) STRICT
) STRICT, WITHOUT ROWID
;
-- Blocks
@@ -30,5 +30,5 @@ CREATE TABLE IF NOT EXISTS blocks (
size INTEGER NOT NULL,
PRIMARY KEY (hash, blocklist_hash, idx),
FOREIGN KEY(blocklist_hash) REFERENCES blocklists(blocklist_hash) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
) STRICT
) STRICT, WITHOUT ROWID
;