Revamp workspace archive handling with async support, input validation improvements and better session management
This commit is contained in:
@@ -33,6 +33,11 @@ export function initializeAttachments(db) {
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS upload_leases_user ON upload_leases(username);
|
||||
CREATE TABLE IF NOT EXISTS workspace_operation_leases (
|
||||
username TEXT PRIMARY KEY REFERENCES users(username) ON DELETE CASCADE,
|
||||
token TEXT NOT NULL UNIQUE,
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
CREATE TRIGGER IF NOT EXISTS release_message_attachment AFTER DELETE ON message_attachments
|
||||
BEGIN
|
||||
DELETE FROM attachments WHERE id = OLD.attachment_id AND status = 'attached'
|
||||
|
||||
Reference in New Issue
Block a user