Puoi generare automaticamente gli ALTER TABLE necessari usando GROUP_CONCAT su information_schema.columns.