From the Spanish phrase "Rayar la pintura" which means to damage the relationship, usually but not always by cheating on a partner.
Bill was a philanderer, his friends all knew that he had been scratching the paint off his marriage for years.
Charlene's tantrums caused John to feel that she'd been scratching the paint on their relationship.