From f30f4fa7130978225c46c59ad8e98030650523b8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 27 Dec 2011 16:24:50 -0800 Subject: [PATCH] Issue CREATE DATABASE before ALTER TABLE in patch 88 Summary: Sometimes the SQL account may not have CREATE DATABASE privileges, so try to fail this script immediately rather than having it work halfway if the permission is missing. This is just a minor tweak to try to slightly improve some cases, the long term fix is T345 but that's a good deal more work than this. Test Plan: Visually inspected patch; trivial change. Reviewers: jungejason, btrahan, skrul Reviewed By: skrul CC: aran, skrul Differential Revision: https://secure.phabricator.com/D1287 --- resources/sql/patches/088.audit.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/sql/patches/088.audit.sql b/resources/sql/patches/088.audit.sql index a5b23a7cca..a1d90be6d7 100644 --- a/resources/sql/patches/088.audit.sql +++ b/resources/sql/patches/088.audit.sql @@ -1,11 +1,11 @@ +CREATE DATABASE IF NOT EXISTS phabricator_audit; + ALTER TABLE phabricator_owners.owners_packagecommitrelationship ADD COLUMN `auditStatus` varchar(64) NOT NULL, ADD COLUMN `auditReasons` longtext NOT NULL, DROP KEY `packagePHID`, ADD KEY `packagePHID` (`packagePHID`, `auditStatus`, `id`); -CREATE DATABASE IF NOT EXISTS phabricator_audit; - CREATE TABLE IF NOT EXISTs phabricator_audit.audit_comment ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,