Store uploads metadata in a separate sql database table instead of a session (#8415)

This commit is contained in:
Aleksander Machniak
2022-10-09 11:35:14 +02:00
parent e9ce8dc63d
commit 80404a8674
37 changed files with 779 additions and 365 deletions

View File

@@ -365,6 +365,21 @@ CREATE TABLE "filestore" (
CONSTRAINT filestore_user_id_filename UNIQUE (user_id, context, filename)
);
--
-- Table "uploads"
-- Name: uploads; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE "uploads" (
upload_id varchar(64) PRIMARY KEY,
session_id varchar(128) NOT NULL,
"group" varchar(128) NOT NULL,
metadata text NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL
);
CREATE INDEX uploads_session_id_idx ON uploads (session_id, "group", created);
--
-- Table "system"
-- Name: system; Type: TABLE; Schema: public; Owner: postgres
@@ -375,4 +390,4 @@ CREATE TABLE "system" (
value text
);
INSERT INTO "system" (name, value) VALUES ('roundcube-version', '2022081200');
INSERT INTO "system" (name, value) VALUES ('roundcube-version', '2022100100');