update letter outgoing final attachment

This commit is contained in:
efrilm
2025-12-06 11:05:44 +07:00
parent 7b9db24c83
commit e83eefc614
13 changed files with 285 additions and 18 deletions
@@ -0,0 +1,12 @@
ALTER TABLE letter_outgoing_attachments
DROP COLUMN IF EXISTS is_final;
CREATE TABLE IF NOT EXISTS letter_outgoing_final_attachments (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
letter_id UUID NOT NULL REFERENCES letters_outgoing(id) ON DELETE CASCADE,
file_url TEXT NOT NULL,
file_name TEXT NOT NULL,
file_type TEXT NOT NULL,
uploaded_by UUID REFERENCES users(id) ON DELETE SET NULL,
uploaded_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP
);