Drizzle ORM: Your Database Schema, Written in TypeScript
A small ceramics shop renamed one column. The orders table had a column called customer, and someone...
Tag archive
A small ceramics shop renamed one column. The orders table had a column called customer, and someone...

A React Server Components admin dashboard in Next.js: role guard before data, SQL aggregation, a JSX-only chart, and where the approach stops working.
Drizzle's $type<T>() makes a jsonb column read back as a TypeScript type. It is a cast with no runtime, so the shape of every stored object is a convention. Here is what that costs, measured, and the two things Postgres refuses to put in a jsonb value whatever your types say.
Step-by-step guide to install Drizzle, define a schema, run migrations, and query from server components in Next.js.
Prisma 7's rewrite closed a lot of the gap with Drizzle. Not all of it. The 30-second version: ...

Prisma 8 changed the ORM debate. Compare Prisma vs Drizzle on performance, bundle size, SQL control, stability, and database support to pick the right ORM.

Prevent double booking in PostgreSQL without UNIQUE or EXCLUDE: advisory locks, an overlap check, and when EXCLUDE is the right choice.
Our migrations folder is 99 per cent machine-written JSON by line count, and the exceptions are the interesting files: a hand-written data migration with no snapshot, and an index number that does not exist.

Race condition testing with real PostgreSQL: readiness gates, observed lock waits, provider stubs, and the false confidence a timed assertion can give.
TL;DR drizzle-kit migrate fails on its very first file with relation "users" already...
Every time I used an ERD tool, I started hating it sooner or later. Top of that, after completing...

The first time we turned on Row-Level Security, nothing happened. Policies were in place, ENABLE ROW...