Support for language codes up to 16 chars long (e.g. es-419) in database schema (#6851)

This commit is contained in:
Aleksander Machniak
2020-02-01 09:40:11 +01:00
parent 60c8dd2e23
commit 50d6ea30e0
11 changed files with 84 additions and 16 deletions

View File

@@ -24,7 +24,7 @@ CREATE TABLE users (
last_login timestamp with time zone DEFAULT NULL,
failed_login timestamp with time zone DEFAULT NULL,
failed_login_counter integer DEFAULT NULL,
"language" varchar(5),
"language" varchar(16),
preferences text DEFAULT ''::text NOT NULL,
CONSTRAINT users_username_key UNIQUE (username, mail_host)
);
@@ -246,7 +246,7 @@ CREATE INDEX cache_messages_expires_idx ON cache_messages (expires);
CREATE TABLE dictionary (
user_id integer DEFAULT NULL
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
"language" varchar(5) NOT NULL,
"language" varchar(16) NOT NULL,
data text NOT NULL,
CONSTRAINT dictionary_user_id_language_key UNIQUE (user_id, "language")
);
@@ -314,4 +314,4 @@ CREATE TABLE "system" (
value text
);
INSERT INTO "system" (name, value) VALUES ('roundcube-version', '2019092900');
INSERT INTO "system" (name, value) VALUES ('roundcube-version', '2020020100');