mirror of
https://github.com/syncthing/syncthing.git
synced 2025-12-23 22:18:14 -05:00
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:
@@ -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
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user