You can’t undo history.

The Calgary Flames at least figured out a way to stop it.

With Wednesday’s 3-2 triumph over the Phoenix Coyotes at the Saddledome, the Flames — FINALLY! — ended a franchise-record seven-game losing skid on home ice.

“It seems like it’s been forever since we came in here and were able to smile after a game instead of putting our heads in our hands,” said Flames left-winger TJ Galiardi.

“We talked about it internally, that it was getting a little ridiculous how long it’s been since we’ve won here. The fans have been sticking through it and supporting us all the way, so we wanted to do something for them.”

Wednesday’s win wasn’t just a boost for fans of this rebuilding bunch.

It was a boost for the confidence of a group of guys who might have been on the brink of forgetting the lyrics to Johnny Cash’s Ring of Fire, the song that blares from the speakers at the Saddledome after the locals collect two points.

The last time the crew from Calgary celebrated an NHL victory under the saddle-shaped roof, Santa Claus had yet to drop off his gifts and Flames head coach Bob Hartley and Vancouver Canucks bench-boss John Tortorella were — well, they might have been — still exchanging Christmas cards.

Hartley’s squad scored only four times during the seven-game slide at the Saddledome, but it nearly equalled that output in Wednesday’s date with the Desert Dogs, which marked the start of a five-game homestand.