Using database triggers to reliably track model history with Wes Kendall

Channel:
Subscribers:
42,400
Published on ● Video Link: https://www.youtube.com/watch?v=xrhDXWypsZU



Duration: 0:00
84 views
2


Tracking model history is an essential aspect of many problems encountered in web applications, from simple audit trails to preserving values of fields during state transitions. There are a wide array of approaches to do this with Django apps, almost all of which are subject to performance penalties, require unstructured JSON fields to track history, or can easily be bypassed accidentally in application code.

In this talk, we show a new way to to track history in Django with database triggers. We specifically focus on Postgres databases using the [django-pghistory](https://github.com/opus10/django-pghi...) app. We discuss the benefits of using database triggers for history in the context of simplicity, performance, and reliability. We also discuss the benefits of using structured history tables and how this can allow engineers to solve complex history-related modeling problems.

Attendees of this talk will be exposed to a totally new way to think about history tracking in their application, along with an understanding of the pros and cons of using database triggers to track history in practice.

This talk was presented at: https://2023.djangocon.us/talks/using...

LINKS:
Follow Wes Kendall 👇


Follow Maxwell Muoto 👇
On Twitter: / maxmuoto



Follow DjangCon US 👇
https://fosstodon.org/@djangocon
/ djangocon

Follow DEFNA 👇
https://www.defna.org/

Video production by Confreaks
Follow Confreaks 👇
https://confreaks.com/
https://x.com/confreaks




Other Videos By Confreaks


2025-01-26Huggable data! Making the ephemeral last with textile dataviz! - Aldís Elfarsdóttir at !!Con 2024
2025-01-25Recreating Sketchpad, the first GUI! - Adam Solove at !!Con 2024
2025-01-25A brief history of keyboards! - Jesse Chen at !!Con 2024
2025-01-25The astrolabe! Digital technology recreating ancient analog computers! - Jes Wolfe at !!Con 2024
2025-01-24Let’s run a tiny chess neural network by hand! - Amédée d’Aboville at !!Con 2024
2025-01-24Programming with only exceptions! - Nicole Tietz-Sokolskaya at !!Con 2024
2025-01-24Let’s make local and accountable tech! - Dawn Walker at !!Con 2024
2025-01-20Hosting and DevOps for Django with Benjamin "Zags" Zagorsky
2025-01-20Nothing for Us, Without Us; Breaking Unconscious Bias in Building Products with Victor Ogunjobi
2025-01-20Inside Out: My Journey of Understanding Inclusion with Natalia Bidart
2025-01-20Using database triggers to reliably track model history with Wes Kendall
2025-01-20✨ Modern editing experience for your Django models with Wagtail 🐦 with Sage Abdullah
2025-01-20Panel Discussion: Who put me in charge? Moving beyond day-to-day coding in Django with Jay Miller
2025-01-20Automate Your City Data with Python with Philip James
2025-01-20Don't Buy the "A.I." Hype with Tim Allen
2025-01-20There's More to Open Source than Code by Ramon Huidobro
2025-01-20AfroPython: Using Django to change black people life in Brazil with Felipe de Morais
2025-01-20DjangoCon Africa: Daniele Procida Lightning talk
2025-01-20Powering Energy Storage Beyond Excel with Calvin Hendryx-Parker
2025-01-20Strategies for handling conflicts and rollbacks in Django database migrations by Abigail Afi Gbadago
2025-01-20Keynote: Django the Dinosaur: A Story About A Web Framework with Julia Solórzano