-- Databases that already applied the earlier 004 kept the original in a BYTEA column. -- Drop it. Fresh installs create the table without that column; both statements are then no-ops. ALTER TABLE attachments DROP CONSTRAINT IF EXISTS attachments_body_len; ALTER TABLE attachments DROP COLUMN IF EXISTS body;