From 13bf353f14251f0568ef824465c422946fdb1c30 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 13 Jan 2012 12:07:50 -0800 Subject: [PATCH] Shorten Phriction slug field to 256 to avoid key length issues in UTF-8 default databases Summary: This is a stopgap patch until we fix T345/T327 properly, but you can't add a 512-character key to a UTF-8 column because it creates an index on more than 767 bytes, which is the key length limit. Test Plan: Ran schmea upgrade script. Reviewers: indiefan, btrahan, jungejason Reviewed By: jungejason CC: aran, epriestley, xela, jungejason Maniphest Tasks: T327 Differential Revision: https://secure.phabricator.com/D1391 --- resources/sql/patches/060.phriction.sql | 2 +- resources/sql/patches/094.phrictioncolumn.sql | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 resources/sql/patches/094.phrictioncolumn.sql diff --git a/resources/sql/patches/060.phriction.sql b/resources/sql/patches/060.phriction.sql index c7f5efee4b..ba8420dd1a 100644 --- a/resources/sql/patches/060.phriction.sql +++ b/resources/sql/patches/060.phriction.sql @@ -4,7 +4,7 @@ CREATE TABLE phabricator_phriction.phriction_document ( id INT UNSIGNED NOT NULL, phid VARCHAR(64) BINARY NOT NULL, UNIQUE KEY (phid), - slug VARCHAR(512) NOT NULL, + slug VARCHAR(256) NOT NULL, UNIQUE KEY (slug), depth INT UNSIGNED NOT NULL, UNIQUE KEY (depth, slug), diff --git a/resources/sql/patches/094.phrictioncolumn.sql b/resources/sql/patches/094.phrictioncolumn.sql new file mode 100644 index 0000000000..4e9670bf1d --- /dev/null +++ b/resources/sql/patches/094.phrictioncolumn.sql @@ -0,0 +1,2 @@ +ALTER TABLE phabricator_phriction.phriction_document + CHANGE slug slug VARCHAR(256) NOT NULL;