-- Add folder_id column to documentUploads table to persist folder association during batch uploads
ALTER TABLE documentUploads ADD COLUMN folder_id uuid;
-- Add foreign key constraint referencing folders table
ALTER TABLE documentUploads ADD CONSTRAINT fk_documentuploads_folder_id FOREIGN KEY (folder_id) REFERENCES folders(id);
-- Add index for efficient lookup by folder
CREATE INDEX idx_documentuploads_folder_id ON documentUploads(folder_id);
