From d900d58f26a1ebf78ad5b60b3a403ce2a032dd6f Mon Sep 17 00:00:00 2001 From: Albert S Date: Sat, 13 Aug 2022 13:33:54 +0200 Subject: [PATCH] shared: migrations: Add 3.sql: Drop potentailly harmful trigger In [1] it's stated that "If the values "inserted" into the text columns as part of a 'delete' command are not the same as those currently stored within the table, the results may be unpredictable." It's to be assumed only inserting ftsid is unpredictable. We have no way for a proper delete because files are not immutable or may have been deleted. For now the index will contain entries for files that don't exist. They won't appear in search results as they won't be joined in the query. [1] https://www.sqlite.org/fts5.html#the_delete_command --- shared/migrations/3.sql | 1 + shared/migrations/migrations.qrc | 1 + 2 files changed, 2 insertions(+) create mode 100644 shared/migrations/3.sql diff --git a/shared/migrations/3.sql b/shared/migrations/3.sql new file mode 100644 index 0000000..451bec7 --- /dev/null +++ b/shared/migrations/3.sql @@ -0,0 +1 @@ +DROP trigger content_ad; diff --git a/shared/migrations/migrations.qrc b/shared/migrations/migrations.qrc index eb1c48b..1160a07 100644 --- a/shared/migrations/migrations.qrc +++ b/shared/migrations/migrations.qrc @@ -2,5 +2,6 @@ 1.sql 2.sql + 3.sql