From 4eb439964003f08f1275dbc043b207e886694b9d Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 1 Oct 2014 10:11:19 -0700 Subject: [PATCH] Convert SavedQuery / NamedQuery to text, not bytes Summary: Ref T1191. Similar issue to D10613. This column usually has a hash exactly 12 bytes long, but sometimes stores an internal builtin query name like "open", "all", etc. It might be nice to promote those to 12-byte hashes of a consistent length eventually, but for now just make this a variable-length column. Test Plan: Ran migration, no longer saw issues with reordering builtin saved searches. Reviewers: btrahan Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10614 --- src/applications/search/storage/PhabricatorNamedQuery.php | 2 +- src/applications/search/storage/PhabricatorSavedQuery.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/search/storage/PhabricatorNamedQuery.php b/src/applications/search/storage/PhabricatorNamedQuery.php index 154e6d9b18..3df30cc229 100644 --- a/src/applications/search/storage/PhabricatorNamedQuery.php +++ b/src/applications/search/storage/PhabricatorNamedQuery.php @@ -17,7 +17,7 @@ final class PhabricatorNamedQuery extends PhabricatorSearchDAO self::CONFIG_COLUMN_SCHEMA => array( 'engineClassName' => 'text128', 'queryName' => 'text255', - 'queryKey' => 'bytes12', + 'queryKey' => 'text12', 'isBuiltin' => 'bool', 'isDisabled' => 'bool', 'sequence' => 'uint32', diff --git a/src/applications/search/storage/PhabricatorSavedQuery.php b/src/applications/search/storage/PhabricatorSavedQuery.php index eb6b29597c..a8e8456e2a 100644 --- a/src/applications/search/storage/PhabricatorSavedQuery.php +++ b/src/applications/search/storage/PhabricatorSavedQuery.php @@ -14,7 +14,7 @@ final class PhabricatorSavedQuery extends PhabricatorSearchDAO ), self::CONFIG_COLUMN_SCHEMA => array( 'engineClassName' => 'text255', - 'queryKey' => 'bytes12', + 'queryKey' => 'text12', ), self::CONFIG_KEY_SCHEMA => array( 'key_queryKey' => array(