From 01de3dff81a40da93a14cc19a908e8582db206b2 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 24 Oct 2012 13:46:17 -0700 Subject: [PATCH] Allow using StorageFixtureScopeGuard on Windows --- resources/sql/patches/draft-metadata.sql | 2 +- .../testing/fixture/PhabricatorStorageFixtureScopeGuard.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/sql/patches/draft-metadata.sql b/resources/sql/patches/draft-metadata.sql index 25b12d0933..ad9ecc894a 100644 --- a/resources/sql/patches/draft-metadata.sql +++ b/resources/sql/patches/draft-metadata.sql @@ -1,4 +1,4 @@ ALTER TABLE `{$NAMESPACE}_draft`.`draft` -ADD `metadata` longtext NOT NULL DEFAULT '' AFTER `draft`; +ADD `metadata` longtext AFTER `draft`; UPDATE `{$NAMESPACE}_draft`.`draft` SET `metadata` = '[]'; diff --git a/src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php b/src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php index 358b04f482..6835a0b451 100644 --- a/src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php +++ b/src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php @@ -27,7 +27,7 @@ final class PhabricatorStorageFixtureScopeGuard { $this->name = $name; execx( - '%s upgrade --force --namespace %s', + 'php %s upgrade --force --namespace %s', $this->getStorageBinPath(), $this->name); @@ -41,14 +41,14 @@ final class PhabricatorStorageFixtureScopeGuard { PhabricatorLiskDAO::popStorageNamespace(); execx( - '%s destroy --force --namespace %s', + 'php %s destroy --force --namespace %s', $this->getStorageBinPath(), $this->name); } private function getStorageBinPath() { $root = dirname(phutil_get_library_root('phabricator')); - return $root.'/bin/storage'; + return $root.'/scripts/sql/manage_storage.php'; } }