1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00
phorge-phorge/resources/sql/patches/060.phriction.sql
epriestley 13bf353f14 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
2012-01-13 15:25:18 -08:00

12 lines
356 B
SQL

CREATE DATABASE IF NOT EXISTS phabricator_phriction;
CREATE TABLE phabricator_phriction.phriction_document (
id INT UNSIGNED NOT NULL,
phid VARCHAR(64) BINARY NOT NULL,
UNIQUE KEY (phid),
slug VARCHAR(256) NOT NULL,
UNIQUE KEY (slug),
depth INT UNSIGNED NOT NULL,
UNIQUE KEY (depth, slug),
contentID INT UNSIGNED NOT NULL
) ENGINE=InnoDB;