Move the dashboard grid thumbnails to backend cache

This commit is contained in:
Andrey Antukh 2022-03-22 17:22:53 +01:00 committed by Alonso Torres
parent b91c42e186
commit c876534c85
9 changed files with 167 additions and 82 deletions

View file

@ -8,3 +8,6 @@ CREATE TABLE file_frame_thumbnail (
PRIMARY KEY(file_id, frame_id)
);
ALTER TABLE file_frame_thumbnail
ALTER COLUMN data SET STORAGE external;

View file

@ -0,0 +1,14 @@
CREATE TABLE file_thumbnail (
file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE,
revn bigint NOT NULL,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
deleted_at timestamptz NULL,
data text NULL,
props jsonb NULL,
PRIMARY KEY(file_id, revn)
);
ALTER TABLE file_thumbnail
ALTER COLUMN data SET STORAGE external,
ALTER COLUMN props SET STORAGE external;