How can spellcasters defeat golems?

In Pathfinder 1e golems have a Magic Immunity which apparently makes them immune to all spells that allow Spell Resistance.

So how to defeat those? An obvious answer would be a buffed up fighter or something to destroy it. The catch is that we’re playing as a group of only spellcasters (Witch, Wizard, 2 Sorcerers) so that’s not really an option. What spells or other things can we use?

If you say spells that don’t allow SR then please be specific with some actually good ones because I can’t really find any. Note that we’re playing at rather high level with lvl 5-6 spell slots now.

Another possibility might be summoning but most summoned creatures seem rather weak so they would have trouble with overcoming the golem’s DR – so again be specific if you want to suggest summoning.

What else?