Skip to content

Latest commit

 

History

History
64 lines (51 loc) · 2.5 KB

README.md

File metadata and controls

64 lines (51 loc) · 2.5 KB

drizzle-pg-notify-audit-table

Problem

  1. You have some tables in your database that you want to audit. You want to know who changed what and when. You want to be able to query this data easily and see the changes over time.

  2. You want to be able to subscribe to changes in the database and be notified in real-time.

Solution

  1. Audit
  1. Notifications

Example repository integrating:

To install dependencies:

bun install

To run:

bun run dev

This example projects implements 3 tables:

  • users
  • posts (with a foreign key to users)
  • comments (with a foreign key to users and posts)
  • record_version (stored in a audit table)

Server: