From f770900983c1774de4b84ab950312b5422e16509 Mon Sep 17 00:00:00 2001 From: vrana Date: Wed, 15 Aug 2012 17:32:43 -0700 Subject: [PATCH] Save edge type as number Summary: We use numbers here and I see no reason for strings. Test Plan: $ bin/storage upgrade Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3303 --- resources/sql/patches/edgetype.sql | 10 ++++++++++ .../storage/patch/PhabricatorBuiltinPatchList.php | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 resources/sql/patches/edgetype.sql diff --git a/resources/sql/patches/edgetype.sql b/resources/sql/patches/edgetype.sql new file mode 100644 index 0000000000..15dc5661aa --- /dev/null +++ b/resources/sql/patches/edgetype.sql @@ -0,0 +1,10 @@ +ALTER TABLE {$NAMESPACE}_phame.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_maniphest.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_repository.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_differential.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_file.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_user.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_project.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_metamta.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_harbormaster.edge MODIFY type int unsigned NOT NULL; +ALTER TABLE {$NAMESPACE}_ponder.edge MODIFY type int unsigned NOT NULL; diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index a1934f6681..0d10dd2e36 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -968,6 +968,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'type' => 'sql', 'name' => $this->getPatchPath('daemonstatuskey.sql'), ), + 'edgetype.sql' => array( + 'type' => 'sql', + 'name' => $this->getPatchPath('edgetype.sql'), + ), ); }