From cbde56cdce1a7ec5919a84f8d893c6eae568603d Mon Sep 17 00:00:00 2001 From: vrana Date: Mon, 8 Oct 2012 16:04:07 -0700 Subject: [PATCH] Properly create xhpast database Summary: It isn't deleted by `storage destroy`. This should be a no-op on current storage because we execute `CREATE DATABASE IF NOT EXISTS`. Test Plan: $ bin/storage destroy --dryrun Reviewers: nh, epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3659 --- resources/sql/patches/xhprof.sql | 1 - .../storage/patch/PhabricatorBuiltinPatchList.php | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/sql/patches/xhprof.sql b/resources/sql/patches/xhprof.sql index 05f2e160cf..3764037c41 100644 --- a/resources/sql/patches/xhprof.sql +++ b/resources/sql/patches/xhprof.sql @@ -1,4 +1,3 @@ -CREATE DATABASE {$NAMESPACE}_xhprof; CREATE TABLE {$NAMESPACE}_xhprof.xhprof_sample ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `filePHID` VARCHAR(64) NOT NULL COLLATE utf8_bin, diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index 35c3986953..561023fbb1 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -167,6 +167,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'type' => 'db', 'name' => 'ponder', ), + 'db.xhpast' => array( + 'type' => 'db', + 'name' => 'xhpast', + ), '0000.legacy.sql' => array( 'type' => 'sql', 'name' => $this->getPatchPath('0000.legacy.sql'),