Automatically remove orphan files
This commit is contained in:
@ -52,7 +52,7 @@ CREATE TABLE movements
|
||||
account_id INTEGER NOT NULL REFERENCES accounts ON DELETE CASCADE,
|
||||
time BIGINT NOT NULL,
|
||||
label VARCHAR(200) NOT NULL,
|
||||
file_id INT REFERENCES files ON DELETE SET NULL,
|
||||
file_id INT REFERENCES files ON DELETE RESTRICT,
|
||||
amount REAL NOT NULL,
|
||||
checked BOOLEAN NOT NULL DEFAULT false,
|
||||
time_create BIGINT NOT NULL,
|
||||
@ -62,7 +62,7 @@ CREATE TABLE movements
|
||||
CREATE TABLE inbox
|
||||
(
|
||||
id SERIAL PRIMARY KEY,
|
||||
file_id INTEGER NOT NULL REFERENCES files ON DELETE CASCADE,
|
||||
file_id INTEGER NOT NULL REFERENCES files ON DELETE RESTRICT,
|
||||
user_id INTEGER NOT NULL REFERENCES users ON DELETE CASCADE,
|
||||
account_id INTEGER REFERENCES accounts ON DELETE CASCADE,
|
||||
time_create BIGINT NOT NULL,
|
||||
|
Reference in New Issue
Block a user