xftp: delete agent rcv files on completion, error, item delete (#2040)

This commit is contained in:
spaced4ndy
2023-03-21 15:21:14 +04:00
committed by GitHub
parent cfc323862f
commit 60d6a47bdb
10 changed files with 140 additions and 63 deletions
+4 -2
View File
@@ -195,7 +195,8 @@ CREATE TABLE files(
ci_file_status TEXT,
file_inline TEXT,
agent_snd_file_id BLOB NULL,
private_snd_file_descr TEXT NULL
private_snd_file_descr TEXT NULL,
agent_snd_file_deleted INTEGER DEFAULT 0 CHECK(agent_snd_file_deleted NOT NULL)
);
CREATE TABLE snd_files(
file_id INTEGER NOT NULL REFERENCES files ON DELETE CASCADE,
@@ -222,7 +223,8 @@ CREATE TABLE rcv_files(
file_inline TEXT,
file_descr_id INTEGER NULL
REFERENCES xftp_file_descriptions ON DELETE SET NULL,
agent_rcv_file_id BLOB NULL
agent_rcv_file_id BLOB NULL,
agent_rcv_file_deleted INTEGER DEFAULT 0 CHECK(agent_rcv_file_deleted NOT NULL)
);
CREATE TABLE snd_file_chunks(
file_id INTEGER NOT NULL,