DEV Community

Son Tran profile picture

Son Tran

Software engineer and indie founder with 15+ years of experience. Built Schemity: a native desktop ERD tool for developers who want their schema in Git, not someone else's cloud. Based in Hanoi, VN.

1 Week Community Wellness Streak
Eight Year Club
Writing Debut
Seven Year Club
Six Year Club
Five Year Club
Four Year Club
Three Year Club
Two Year Club
One Year Club
How to Track Schema Changes in PostgreSQL: DDL Logging, an Event Trigger or a Schema Snapshot

How to Track Schema Changes in PostgreSQL: DDL Logging, an Event Trigger or a Schema Snapshot

Comments
9 min read

Want to connect with Son Tran?

Create an account to connect with Son Tran. You can also sign in below to proceed if you already have an account.

Already have an account? Sign in
How to Auto-Update an updated_at Column: MySQL ON UPDATE vs a Database Trigger vs the ORM

How to Auto-Update an updated_at Column: MySQL ON UPDATE vs a Database Trigger vs the ORM

Comments
10 min read
SQL Server INT to BIGINT Primary Key: Four Ways to Change It and What Each One Costs

SQL Server INT to BIGINT Primary Key: Four Ways to Change It and What Each One Costs

Comments
11 min read
Round-Tripping TPC-DS and a Snowflake Feature Schema Through a Database Diagram: What Snowflake Lost and What We Fixed

Round-Tripping TPC-DS and a Snowflake Feature Schema Through a Database Diagram: What Snowflake Lost and What We Fixed

Comments
13 min read
Round-Tripping Campfire and Jellyfin Through a Database Diagram: What SQLite Lost and What We Fixed

Round-Tripping Campfire and Jellyfin Through a Database Diagram: What SQLite Lost and What We Fixed

Comments
13 min read
Round-Tripping Bitwarden and Smartstore Through a Database Diagram: What SQL Server Lost and What We Fixed

Round-Tripping Bitwarden and Smartstore Through a Database Diagram: What SQL Server Lost and What We Fixed

Comments
15 min read
Round-Tripping Invoice Ninja and Sylius Through a Database Diagram: What MySQL Lost and What We Fixed

Round-Tripping Invoice Ninja and Sylius Through a Database Diagram: What MySQL Lost and What We Fixed

Comments
15 min read
Round-Tripping Mastodon and Saleor Through a Database Diagram: What Broke and What We Fixed

Round-Tripping Mastodon and Saleor Through a Database Diagram: What Broke and What We Fixed

Comments
18 min read
MySQL UNSIGNED Primary Keys: Signed or Unsigned, and How to Fix Error 3780 When They Mix

MySQL UNSIGNED Primary Keys: Signed or Unsigned, and How to Fix Error 3780 When They Mix

Comments 2
12 min read
Foreign Keys Between Modules in a Modular Monolith: Keep, Restrict, or Drop?

Foreign Keys Between Modules in a Modular Monolith: Keep, Restrict, or Drop?

Comments
10 min read
PostgreSQL: Changing an Integer Column to Boolean - In Place or a New Column, and the Four Errors on the Way

PostgreSQL: Changing an Integer Column to Boolean - In Place or a New Column, and the Four Errors on the Way

Comments
10 min read
What Breaks When a Database Diagram Reaches 1,000 Tables, and What We Redesigned

What Breaks When a Database Diagram Reaches 1,000 Tables, and What We Redesigned

Comments
13 min read
PostgreSQL Constraint Naming Convention: Which Pattern to Use, and How to Find the Names That Drifted

PostgreSQL Constraint Naming Convention: Which Pattern to Use, and How to Find the Names That Drifted

Comments
8 min read
PostgreSQL: Cannot Alter Type of a Column Used by a View - How to Change It, and How to Find Every View in the Way

PostgreSQL: Cannot Alter Type of a Column Used by a View - How to Change It, and How to Find Every View in the Way

Comments
9 min read
PostgreSQL serial vs identity: Which to Use, and How to Convert Old serial Columns

PostgreSQL serial vs identity: Which to Use, and How to Convert Old serial Columns

Comments
9 min read
Database MCP Server: Should an AI Agent Run SQL or Only Read the Schema?

Database MCP Server: Should an AI Agent Run SQL or Only Read the Schema?

Comments
7 min read
Changing a Column Type in SQLite: The Table Rebuild and What It Deletes

Changing a Column Type in SQLite: The Table Rebuild and What It Deletes

Comments
8 min read
ON DELETE SET NULL vs CASCADE vs RESTRICT in PostgreSQL: Which to Use

ON DELETE SET NULL vs CASCADE vs RESTRICT in PostgreSQL: Which to Use

Comments
8 min read
A PostgreSQL Role That Reads the Schema but Not the Data: What to Grant

A PostgreSQL Role That Reads the Schema but Not the Data: What to Grant

Comments
8 min read
Adding a NOT NULL Column to a Large PostgreSQL Table: Constant Default, Backfill or NOT VALID

Adding a NOT NULL Column to a Large PostgreSQL Table: Constant Default, Backfill or NOT VALID

1
Comments
10 min read
PostgreSQL numeric vs double precision vs money: Which Type to Use for Prices

PostgreSQL numeric vs double precision vs money: Which Type to Use for Prices

Comments 1
9 min read
PostgreSQL Generated Column vs Trigger: Which to Use for a Derived Column

PostgreSQL Generated Column vs Trigger: Which to Use for a Derived Column

Comments
10 min read
PostgreSQL Unique Constraint vs Unique Index: Which to Use, and How to Add One Without Locking the Table

PostgreSQL Unique Constraint vs Unique Index: Which to Use, and How to Add One Without Locking the Table

Comments
9 min read
Polymorphic Associations in PostgreSQL: One commentable_id Column or a Foreign Key per Table?

Polymorphic Associations in PostgreSQL: One commentable_id Column or a Foreign Key per Table?

Comments
7 min read
Column Comments in PostgreSQL and MySQL: How to Document Columns Without a Migration

Column Comments in PostgreSQL and MySQL: How to Document Columns Without a Migration

Comments 1
7 min read
Circular Foreign Keys: Why the First Row Cannot Be Inserted

Circular Foreign Keys: Why the First Row Cannot Be Inserted

Comments
10 min read
PostgreSQL timestamp vs timestamptz: Which to Use and How to Find the Wrong Ones

PostgreSQL timestamp vs timestamptz: Which to Use and How to Find the Wrong Ones

Comments
8 min read
Export a Database Data Dictionary: HTML, Markdown and Excel from Your ERD

Export a Database Data Dictionary: HTML, Markdown and Excel from Your ERD

Comments
7 min read
Schema Linting vs Migration Linting: Which Database Problems Each One Can See

Schema Linting vs Migration Linting: Which Database Problems Each One Can See

Comments
11 min read
Postgres Array Column vs Junction Table: What Each One Does to Your ERD

Postgres Array Column vs Junction Table: What Each One Does to Your ERD

Comments 1
10 min read
DrawSQL Alternative: An Offline Desktop ERD Tool With No Table Limits

DrawSQL Alternative: An Offline Desktop ERD Tool With No Table Limits

Comments
21 min read
You Cannot Tell Which of Your ERD Files Are Under Version Control

You Cannot Tell Which of Your ERD Files Are Under Version Control

Comments
5 min read
Why Schemity Has No Zoom: Fuzzy Search and a Minimap Instead

Why Schemity Has No Zoom: Fuzzy Search and a Minimap Instead

Comments
7 min read
Database Views in Your ERD: Read-Only Entities, Not Fake Tables

Database Views in Your ERD: Read-Only Entities, Not Fake Tables

Comments 1
5 min read
SSMS Database Diagrams: Your ERD Is Trapped Inside the Database It Documents

SSMS Database Diagrams: Your ERD Is Trapped Inside the Database It Documents

Comments
6 min read
Supabase Schema Diagram: Get an ERD You Can Keep, Not a Dashboard View

Supabase Schema Diagram: Get an ERD You Can Keep, Not a Dashboard View

Comments
6 min read
ON DELETE CASCADE Is Invisible in Your ERD and in Your Database Logs

ON DELETE CASCADE Is Invisible in Your ERD and in Your Database Logs

Comments 1
10 min read
Lucidchart ERD Alternative: A Desktop ERD Tool That Connects to Your Database

Lucidchart ERD Alternative: A Desktop ERD Tool That Connects to Your Database

Comments
10 min read
Comparing Staging and Production Database Schemas Side by Side

Comparing Staging and Production Database Schemas Side by Side

Comments
6 min read
Roles and Permissions Schema Design for Multi-Tenant RBAC (Part 2)

Roles and Permissions Schema Design for Multi-Tenant RBAC (Part 2)

Comments 7
17 min read
Many-to-Many in an ERD Shouldn't Mean Hand-Building the Junction Table

Many-to-Many in an ERD Shouldn't Mean Hand-Building the Junction Table

1
Comments 1
9 min read
Why ERD Tools Draw Your 1:1 Relationship as 1:N

Why ERD Tools Draw Your 1:1 Relationship as 1:N

Comments
6 min read
Your DDD Context Map Is Already in Your Foreign Keys

Your DDD Context Map Is Already in Your Foreign Keys

Comments
9 min read
Why Your ERD Export Turns Blurry - and How SVG Export Fixes It

Why Your ERD Export Turns Blurry - and How SVG Export Fixes It

Comments
6 min read
The Data Dictionary Should Live in the ERD, Not in a Spreadsheet

The Data Dictionary Should Live in the ERD, Not in a Spreadsheet

Comments
5 min read
Schemity vs DbSchema: The Lightweight Alternative

Schemity vs DbSchema: The Lightweight Alternative

Comments
8 min read
You Don't Need a Diagram of All 800 Tables

You Don't Need a Diagram of All 800 Tables

Comments
5 min read
Keeping Your ERD Updated Shouldn't Be a Second Job

Keeping Your ERD Updated Shouldn't Be a Second Job

Comments
4 min read
Switching ERD Tools Shouldn't Mean Starting Over

Switching ERD Tools Shouldn't Mean Starting Over

Comments
6 min read
ERD Tool Free-Tier Limits: 15-Table and 60-Object Caps Distort Models

ERD Tool Free-Tier Limits: 15-Table and 60-Object Caps Distort Models

Comments
6 min read
How to Keep ERD Relationship Lines Readable: Hops, Waypoints, Colors

How to Keep ERD Relationship Lines Readable: Hops, Waypoints, Colors

Comments
6 min read
AI ERD Design With Ollama: Schema Help That Never Leaves Your Machine

AI ERD Design With Ollama: Schema Help That Never Leaves Your Machine

Comments
5 min read
Supabase Studio and pgAdmin Won't Keep Your Schema Diagram Layout

Supabase Studio and pgAdmin Won't Keep Your Schema Diagram Layout

Comments
5 min read
Finding a Column Shouldn't Take a SQL Query

Finding a Column Shouldn't Take a SQL Query

Comments
5 min read
Your ERD Shouldn't Be Able to Just Disappear

Your ERD Shouldn't Be Able to Just Disappear

Comments
5 min read
Schemity vs ChartDB: The Offline Desktop Alternative

Schemity vs ChartDB: The Offline Desktop Alternative

Comments
11 min read
Entity Templates: How to Stop Schema Naming and Field-Order Drift

Entity Templates: How to Stop Schema Naming and Field-Order Drift

Comments
5 min read
Documenting Your Production Database Shouldn't Feel Dangerous

Documenting Your Production Database Shouldn't Feel Dangerous

Comments
5 min read
Your Client's Schema Doesn't Belong in Your Cloud Account

Your Client's Schema Doesn't Belong in Your Cloud Account

Comments
4 min read
Stop Hand-Translating Between SQL and Your ERD

Stop Hand-Translating Between SQL and Your ERD

Comments
4 min read
loading...