aurweb/upgrading/4.2.0.txt
Stefan Auditor 24734d06ce 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>
2015-11-12 11:47:20 +01:00

17 lines
430 B
Text

1. Add a new table to store providers from official packages:
----
CREATE TABLE OfficialProviders (
ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
Name VARCHAR(64) NOT NULL,
Provides VARCHAR(64) NOT NULL,
PRIMARY KEY (ID)
) ENGINE = InnoDB;
CREATE UNIQUE INDEX ProviderNameProvides ON OfficialProviders (Name, Provides);
----
2. Resize the email address field:
----
ALTER TABLE Users MODIFY Email VARCHAR(254) NOT NULL;
----