From 24734d06cefdeeb30c58beb52614a8498a089cb6 Mon Sep 17 00:00:00 2001 From: Stefan Auditor Date: Thu, 12 Nov 2015 09:34:23 +0100 Subject: 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 Signed-off-by: Lukas Fleischer --- schema/aur-schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'schema') diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 98e8be0..315a75c 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -25,7 +25,7 @@ CREATE TABLE Users ( AccountTypeID TINYINT UNSIGNED NOT NULL DEFAULT 1, Suspended TINYINT UNSIGNED NOT NULL DEFAULT 0, Username VARCHAR(32) NOT NULL, - Email VARCHAR(256) NOT NULL, + Email VARCHAR(254) NOT NULL, HideEmail TINYINT UNSIGNED NOT NULL DEFAULT 0, Passwd CHAR(32) NOT NULL, Salt CHAR(32) NOT NULL DEFAULT '', -- cgit v1.2.3-70-g09d2