Django: Remove Foreign Key while Retaining Customer Details in Ecom

How can necessary customer data persist in an order record when a user account is removed?

Example:

from django.contrib.auth import get_user_model
from django.db import models

class Purchase(models.Model):
    buyer_email = models.EmailField(null=True, blank=True)
    buyer_name = models.CharField(max_length=50, null=True, blank=True)
    buyer = models.ForeignKey(get_user_model(), on_delete=models.SET_NULL, null=True)

    def update_buyer_info(self):
        if self.buyer:
            self.buyer_name = self.buyer.first_name
            self.buyer_email = self.buyer.email

    def save(self, *args, **kwargs):
        self.update_buyer_info()
        super().save(*args, **kwargs)

Hey everyone, diving into this problem really piqued my interest. I like the idea of saving key customer details directly in the order before the foreign key may vanish. It naturally brings up a question in my mind: how do we best handle cases where the customer information might change after an order is placed? While keeping a snapshot in the order record is super useful for historical accuracy, I’m curious if anyone has tackled scenarios where data updates are necessary after the sale for auditing or customer service improvements. Have any of you implemented a versioning mechanism or perhaps some event-driven update system that can reconcile these details without compromising the integrity of historical orders? Let’s brainstorm about the trade-offs and possibilities here!