-- Fix document metadata VARCHAR constraints
-- Increase the size limit for document_type and file_type columns

ALTER TABLE document_metadata 
    ALTER COLUMN document_type TYPE VARCHAR(255),
    ALTER COLUMN file_type TYPE VARCHAR(255);

-- Also ensure mime_type has sufficient length
ALTER TABLE document_metadata 
    ALTER COLUMN mime_type TYPE VARCHAR(255);