mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-15 10:00:55 +01:00
1b6ddae6b2
Summary: Ref T10205. Ref T10246. This is general modernization, but also supports fixing the interface datasource in T10205. - Update Query. - Update SearchEngine. - Use an ngrams index for searching names efficiently. Test Plan: - Ran migrations. - Searched Almanac devices by name. - Created a new device, searched for it by name. {F1121303} Reviewers: chad Reviewed By: chad Maniphest Tasks: T10205, T10246 Differential Revision: https://secure.phabricator.com/D15319
7 lines
310 B
SQL
7 lines
310 B
SQL
CREATE TABLE {$NAMESPACE}_almanac.almanac_devicename_ngrams (
|
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
objectID INT UNSIGNED NOT NULL,
|
|
ngram CHAR(3) NOT NULL COLLATE {$COLLATE_TEXT},
|
|
KEY `key_object` (objectID),
|
|
KEY `key_ngram` (ngram, objectID)
|
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|