mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Shorten Email column to 254 characters
Using unique indexes on VARCHAR fields with a character count of more than 255 produces an error in MySQL with InnoDB tables and UTF-8 encoding. Also, as per https://www.rfc-editor.org/errata_search.php?eid=1690, the maximum length for email addresses is limited to 254 characters. Fixes FS#47038. Signed-off-by: Stefan Auditor <stefan.auditor@erdfisch.de> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
d87b138a89
commit
24734d06ce
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ CREATE TABLE Users (
|
||||||
AccountTypeID TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
AccountTypeID TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
||||||
Suspended TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
Suspended TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
Username VARCHAR(32) NOT NULL,
|
Username VARCHAR(32) NOT NULL,
|
||||||
Email VARCHAR(256) NOT NULL,
|
Email VARCHAR(254) NOT NULL,
|
||||||
HideEmail TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
HideEmail TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
Passwd CHAR(32) NOT NULL,
|
Passwd CHAR(32) NOT NULL,
|
||||||
Salt CHAR(32) NOT NULL DEFAULT '',
|
Salt CHAR(32) NOT NULL DEFAULT '',
|
||||||
|
|
|
@ -13,5 +13,5 @@ CREATE UNIQUE INDEX ProviderNameProvides ON OfficialProviders (Name, Provides);
|
||||||
2. Resize the email address field:
|
2. Resize the email address field:
|
||||||
|
|
||||||
----
|
----
|
||||||
ALTER TABLE Users MODIFY Email VARCHAR(256) NOT NULL;
|
ALTER TABLE Users MODIFY Email VARCHAR(254) NOT NULL;
|
||||||
----
|
----
|
||||||
|
|
Loading…
Add table
Reference in a new issue