From df86f87289d5847400d7979a2f46e3a96ec26954 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 12 Sep 2013 13:04:31 -0700 Subject: [PATCH] Add a "dateCreated" key to Maniphest Summary: Depends on D6952. Unpunts there since I'm rolling into a swamp full of schema changes. Test Plan: Issued date-constrained query and saw key as a candidate. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D6954 --- resources/sql/patches/20130912.maniphest.2.created.sql | 2 ++ src/applications/maniphest/query/ManiphestTaskQuery.php | 2 -- .../storage/patch/PhabricatorBuiltinPatchList.php | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 resources/sql/patches/20130912.maniphest.2.created.sql diff --git a/resources/sql/patches/20130912.maniphest.2.created.sql b/resources/sql/patches/20130912.maniphest.2.created.sql new file mode 100644 index 0000000000..dbd259d903 --- /dev/null +++ b/resources/sql/patches/20130912.maniphest.2.created.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task + ADD KEY `key_dateCreated` (dateCreated); diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php index 8c141539ba..d76314d111 100644 --- a/src/applications/maniphest/query/ManiphestTaskQuery.php +++ b/src/applications/maniphest/query/ManiphestTaskQuery.php @@ -232,8 +232,6 @@ final class ManiphestTaskQuery $where[] = $this->buildXProjectWhereClause($conn); $where[] = $this->buildFullTextWhereClause($conn); - // TODO: Add a key for this the next time we hit this table. - if ($this->dateCreatedAfter) { $where[] = qsprintf( $conn, diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index e0967875e5..779df9f851 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -1576,6 +1576,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'type' => 'sql', 'name' => $this->getPatchPath('20130912.maniphest.1.touch.sql'), ), + '20130912.maniphest.2.created.sql' => array( + 'type' => 'sql', + 'name' => $this->getPatchPath('20130912.maniphest.2.created.sql'), + ), ); } }