-- Revert document metadata VARCHAR constraints
-- Note: This may fail if existing data exceeds 50 characters

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

ALTER TABLE document_metadata 
    ALTER COLUMN mime_type TYPE VARCHAR(255);