Skip to content

Commit

Permalink
shared: migrations: Add 3.sql: Drop potentailly harmful trigger
Browse files Browse the repository at this point in the history
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.

Adding a proper delete for unchanged files would be possible
though.

For now index will contain entries for files that don't exist,
but they won't be in the search results as won't be joined
in the query.

[1] https://www.sqlite.org/fts5.html#the_delete_command
  • Loading branch information
crtxcr committed Aug 13, 2022
1 parent eb58b8f commit 9422a5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions shared/migrations/3.sql
@@ -0,0 +1 @@
DROP trigger content_ad;
1 change: 1 addition & 0 deletions shared/migrations/migrations.qrc
Expand Up @@ -2,5 +2,6 @@
<qresource prefix="/looqs-migrations">
<file>1.sql</file>
<file>2.sql</file>
<file>3.sql</file>
</qresource>
</RCC>

0 comments on commit 9422a5b

Please sign in to comment.