From 207f101aee6a633f068548d9096c1df9a1fab2a4 Mon Sep 17 00:00:00 2001 From: Keebuhm Park Date: Fri, 8 Jun 2012 12:40:26 -0700 Subject: [PATCH] SQL patch for notification Summary: Added `PhabricatorBuiltinPatchList` entry so that "storage upgrade" will update the database. Renamed and numbered the notification.sql patch. Test Plan: Drop phabricator_feed.feed_storynotification table if it exists and run bin/storage upgrade to check if the patch is correctly applied. Reviewers: epriestley, btrahan, allenjohnashton Reviewed By: epriestley CC: ddfisher, aran, Korvin Differential Revision: https://secure.phabricator.com/D2687 --- .../patches/{temp.notifications.sql => 138.notification.sql} | 4 ++-- src/infrastructure/setup/sql/PhabricatorBuiltinPatchList.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) rename resources/sql/patches/{temp.notifications.sql => 138.notification.sql} (73%) diff --git a/resources/sql/patches/temp.notifications.sql b/resources/sql/patches/138.notification.sql similarity index 73% rename from resources/sql/patches/temp.notifications.sql rename to resources/sql/patches/138.notification.sql index f10664d539..d05c8d97a1 100644 --- a/resources/sql/patches/temp.notifications.sql +++ b/resources/sql/patches/138.notification.sql @@ -1,8 +1,8 @@ -CREATE TABLE if not exists phabricator_feed.feed_storynotification ( +CREATE TABLE {$NAMESPACE}_feed.feed_storynotification ( userPHID varchar(64) not null collate utf8_bin, primaryObjectPHID varchar(64) not null collate utf8_bin, chronologicalKey BIGINT UNSIGNED NOT NULL, hasViewed boolean not null, UNIQUE KEY (userPHID, chronologicalKey), KEY (userPHID, hasViewed, primaryObjectPHID) -); +) ENGINE=InnoDB, COLLATE utf8_general_ci; diff --git a/src/infrastructure/setup/sql/PhabricatorBuiltinPatchList.php b/src/infrastructure/setup/sql/PhabricatorBuiltinPatchList.php index 41456e08c8..c68f3cab4a 100644 --- a/src/infrastructure/setup/sql/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/setup/sql/PhabricatorBuiltinPatchList.php @@ -851,6 +851,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'name' => $this->getPatchPath('137.auditmetadata.sql'), 'legacy' => 137, ), + '138.notification.sql' => array( + 'type' => 'sql', + 'name' => $this->getPatchPath('138.notification.sql'), + ), 'holidays.sql' => array( 'type' => 'sql', 'name' => $this->getPatchPath('holidays.sql'), -- 2.51.2