-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14ec1af
commit bc5ddeb
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
android/database/src/main/assets/MagicHomeInventory.upgrade.6.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- Context: https://github.com/TWiStErRob/net.twisterrob.inventory/issues/170 | ||
-- FTS3 supported only ASCII characters, FTS4 supports unicode when used with unicode61 tokenizer. | ||
|
||
-- Recreate the Search table with new FTS4 format. | ||
DROP TABLE IF EXISTS Search; | ||
CREATE VIRTUAL TABLE Search USING FTS4 ( | ||
tokenize=unicode61 'remove_diacritics=2', | ||
name, | ||
location | ||
); | ||
|
||
-- Re-insert all data into the new table. | ||
INSERT INTO Search_Refresher (_id) SELECT _id FROM Item; | ||
-- Compact database indexes for faster search experience. | ||
INSERT INTO Search(Search) VALUES('optimize'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters