From 77a876582483e4c600f0947540d0d2c8efdd90e6 Mon Sep 17 00:00:00 2001 From: Afaque Hussain Date: Tue, 19 Mar 2013 15:00:44 -0700 Subject: [PATCH] Schema patch to add a column to Phabricator_File.file table Summary: Added a column called explicit_upload to Phabricator_File.file table Test Plan: By chekcing locally if the the column has been added in table using mysql commands. Reviewers: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5384 --- .../sql/patches/20130319.phabricatorfileexplicitupload.sql | 2 ++ src/applications/files/storage/PhabricatorFile.php | 1 + .../storage/patch/PhabricatorBuiltinPatchList.php | 5 +++++ 3 files changed, 8 insertions(+) create mode 100644 resources/sql/patches/20130319.phabricatorfileexplicitupload.sql diff --git a/resources/sql/patches/20130319.phabricatorfileexplicitupload.sql b/resources/sql/patches/20130319.phabricatorfileexplicitupload.sql new file mode 100644 index 0000000000..8c956e1212 --- /dev/null +++ b/resources/sql/patches/20130319.phabricatorfileexplicitupload.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_file.file + ADD isExplicitUpload BOOLEAN DEFAULT TRUE; diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php index dcbb1d6153..1a65853aff 100644 --- a/src/applications/files/storage/PhabricatorFile.php +++ b/src/applications/files/storage/PhabricatorFile.php @@ -22,6 +22,7 @@ final class PhabricatorFile extends PhabricatorFileDAO protected $storageHandle; protected $ttl; + protected $isExplicitUpload = 1; public function getConfiguration() { return array( diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index 7a3a96fb7e..9da6587cb5 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -1173,6 +1173,11 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'type' => 'sql', 'name' => $this->getPatchPath('releeph.sql'), ), + '20130319.phabricatorfileexplicitupload.sql' => array( + 'type' => 'sql', + 'name' => $this->getPatchPath( + '20130319.phabricatorfileexplicitupload.sql'), + ), ); }