1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00
phorge-phorge/resources/sql/patches/115.prepareutf8.sql
vrana d5bf30bb48 Prepare database for UTF-8
Summary: D1830#8

Test Plan:
`scripts/sql/upgrade_schema.php`
Try adding duplicate SSH Public Key - failed.
Try adding new SSH Public Key - succeeded.

Reviewers: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1852
2012-03-09 18:56:22 -08:00

18 lines
707 B
SQL

ALTER TABLE `phabricator_project`.`project`
MODIFY `phrictionSlug` varchar(128) binary;
ALTER TABLE phabricator_repository.repository_path
ADD COLUMN pathHash varchar(32) binary AFTER path;
UPDATE phabricator_repository.repository_path SET pathHash = MD5(path);
ALTER TABLE phabricator_repository.repository_path
MODIFY pathHash varchar(32) binary not null,
DROP KEY path,
ADD UNIQUE KEY (pathHash);
ALTER TABLE phabricator_user.user_sshkey
ADD COLUMN keyHash varchar(32) binary AFTER keyBody;
UPDATE phabricator_user.user_sshkey SET keyHash = MD5(keyBody);
ALTER TABLE phabricator_user.user_sshkey
MODIFY keyHash varchar(32) binary not null,
DROP KEY keyBody,
ADD UNIQUE KEY (keyHash);