mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 16:00:59 +01:00
a115810912
Summary: Fixes T5614. Ref T4420. Other than the "users" datasource and a couple of others, many datasources ignore what the user typed and just return all results, then rely on the client to filter them. This works fine for rarely used ("legalpad documents") or always small ("task priorities", "applications") datasets, but is something we should graudally move away from as datasets get larger. Add a token table to projects, populate it, and use it to drive the datasource query. Additionally, expose it on the applicationsearch UI. Test Plan: - Ran migration. - Manually checked the table. - Searched for projects by name from ApplicationSearch. - Searched for projects by name from typeahead. - Manually checked the typeahead response. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5614, T4420 Differential Revision: https://secure.phabricator.com/D9896
7 lines
294 B
SQL
7 lines
294 B
SQL
CREATE TABLE {$NAMESPACE}_project.project_datasourcetoken (
|
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
projectID INT UNSIGNED NOT NULL,
|
|
token VARCHAR(128) NOT NULL COLLATE utf8_general_ci,
|
|
UNIQUE KEY (token, projectID),
|
|
KEY (projectID)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|