Son Tran

@tbson

Software engineer loves to build things.

Commit activity

33 commits in the last year

longest streak 4 days

575 / 1,000 XP425 XP to wheel

Wed, Nov 18

While testing Cloudflare D1 for a Schemity post, I rebuilt a parent table with defer_foreign_keys on. The two orders under it were deleted. D1 does not let you switch foreign keys off. Cloudflare's docs offer deferral instead, and deferral only postpones the check for…
schemity.comCloudflare D1 Schema Diagram: Draw It From the Local Wrangler File, an Export, or the Remote Database? - SchemityCloudflare D1 keeps three schemas that drift apart. Schemity measured what the local wrangler file, an export and the remote database each show, and which to draw.

Tue, Nov 17

While building a CI check for migrations, I ran this on MySQL 8.4: ALTER TABLE posts ADD COLUMN author_id BIGINT REFERENCES users (id); It succeeded. No warning. No foreign key either. MySQL 8.4 parses an inline REFERENCES and throws it away. I inserted a post by user 999, who…
schemity.comChecking Database Migrations in CI: What a Pull Request Check Can Catch Without a Database - SchemitySchemity Migration Check reads a pull request's SQL migrations against the schema the older ones build, with no database: what it catches, and what needs a live one.

Thu, Nov 12

A reader asked if the ten cycles Schemity found between the modules of my demo database were real. I moved two tables and all ten were gone. The database is a 34-table store I had split into seven modules. I had filed addresses under shipping, next to warehouses. But users has a…
schemity.comCircular Dependencies Between Modules in a Database: A Real Dependency, or One Table in the Wrong Module? - SchemityOn a 34-table store, ten cycles between modules came down to two misfiled tables. A query and Schemity's Context Map count the cycles; ownership says which are real.

Wed, Nov 11

On a diagram connected to a live database, a table I drew a minute ago looks as real as one in production for years. Halfway through a feature, I could not tell my sketch from what was deployed. In Schemity, the desktop database design software I build, a table I add has a…
schemity.comKeep Your ERD in Sync with the Database - Schemity DocsSchemity re-syncs a reverse-engineered ERD every time you open it - the live database is the source of truth, your layout is preserved, and your diagram never goes stale.

Tue, Nov 10

I started building Schemity because I wanted to decide where a relationship line goes. I design data models for new systems and new features, and the diagram is where I think. It is the input to the design, not a picture made afterwards. A line I cannot place is a map I cannot…
schemity.comCustom Waypoints - Schemity DocsUse custom waypoints in Schemity to route relationship connectors exactly how you want, keeping large ERDs readable by steering lines around entities.
When I design a schema, the whole model lives in my head. If someone renames a field while I am mid-design, that is not a merge conflict. It is a disaster. So Schemity, the desktop database design software I build, has no real-time co-editing, on purpose. On my teams, the…
schemity.comVersion Control in Git - Schemity DocsVersion control your database diagram in Git with Schemity: import a workspace into your repo and commit the JSON. Review a schema change by opening its migration in the change preview.

Mon, Nov 9

A MariaDB 11.4 dump failed on every CREATE when I loaded it into MySQL 8.4. So I had Schemity write the MySQL version instead. Schemity is the desktop database design software I build. In the next release it reads MariaDB as its own database and writes its schema for MySQL: UUID…
We were utilizing MariaDB with ServiceNow but they migrated us off to a new provider so thankfully we didn't have this issue. I could only imageine the headache we would be facing if we had this issue.

Sat, Nov 7

Reviewing a schema an AI agent designed in Schemity, I clicked one foreign key and company_id lit up with it, on both tables. The members table had UNIQUE (company_id, id). In my whole career I had never seen that constraint, so I tested why it was there. With row-level…
schemity.comPostgreSQL Composite Foreign Keys vs Row-Level Security: Which Keeps Tenants Apart? - SchemityRow-level security hides other tenants' rows, yet a foreign key can still point at one. The composite key that closes it, its three traps, and how Schemity draws it.

Fri, Nov 6

While testing a post, I tried to make CockroachDB roll back a failed migration as one unit. By default it commits before every schema change, as MySQL does. So I turned that setting off, unlocked the table, and put everything in one transaction: a data fix, a new column, then a…

Thu, Nov 5

In June 2025 I sent a friend the screenshot on the left to show my progress on Schemity. Two empty boxes, two lines and a bug I had circled in red, and I was proud of it. The boxes had no columns yet, and the line with waypoints cut diagonally where it should have bent. On the…

Tue, Nov 3

I reopened a retired project we had designed in Visual Paradigm. Its diagram had nearly 50 tables. The database it ended up with had about 60. Nothing was wrong with the drawing. It was the design as we last updated it by hand, and the database kept changing after that: Django's…
schemity.comVisual Paradigm Alternative: Database Design Software for $129, Without the Modeling Suite - SchemityVisual Paradigm keeps reverse engineering and patching for its $349 Standard edition. Schemity is the alternative that reads your database for $129 once.
I set up a 34-table demo store with one circular dependency in it, on purpose. Schemity's Context Map found ten. No table has a prefix, so nothing in the names says which module it belongs to. I asked Claude Code to group the tables by domain through the MCP server of Schemity,…
schemity.comReverse Engineering a Legacy Database: Let an AI Agent Group the ERD by Domain - SchemityA reverse engineered ERD shows every table and no domains, because the domains live in the code. Schemity lets an AI agent read that code, group the diagram into legends over MCP, and hand you each step to review.

Mon, Nov 2

I have posted about Schemity for months and never once said plainly what it is, or what it costs. Schemity is desktop database design software. It reads your PostgreSQL, MySQL, SQL Server or SQLite database into a diagram, shows what a schema change will do before it runs, and…
schemity.comSchemity - Database Design Software for Software EngineersDatabase design software that reads your live database, gives your AI agent a local MCP server, and shows each schema migration's impact before it runs. Buy once.
While testing a post on updated_at, I ran one routine MySQL migration and the column stopped updating. No error, no warning. The statement was ALTER TABLE orders MODIFY updated_at with a new default. MODIFY replaces the whole column definition, and I had not repeated ON UPDATE…
schemity.comHow to Auto-Update an updated_at Column: MySQL ON UPDATE vs a Database Trigger vs the ORM - SchemityMySQL ON UPDATE, a trigger or the ORM for updated_at: Schemity compares them, the migrations that silently break each, and the writes an ORM never sees.

Sat, Oct 31

I ran the obvious fix on a SQL Server INT primary key, ALTER COLUMN id BIGINT NOT NULL, and got three errors back instead of a wider column. Msg 5074, twice: the primary key and the foreign key from orders both depend on the column. SQL Server will not change a type while any…
schemity.comSQL Server INT to BIGINT Primary Key: Four Ways to Change It and What Each One Costs - SchemitySchemity tested INT to BIGINT on a SQL Server key: ALTER COLUMN fails with Msg 5074 until the keys go. Four ways to widen it, and when each one fits.

Fri, Oct 30

While rebuilding TPC-DS on Snowflake from Schemity's own SQL, the copy accepted a row the original refuses, and gave it key 1. Snowflake records primary keys but does not enforce them. It enforces NOT NULL. TPC-DS's surrogate keys come with the data being loaded, so the original…
Show thread

Thu, Oct 29

I rebuilt 37signals' Campfire database from the SQL Schemity wrote. Every SQL check passed. Then Campfire couldn't create an account on it. SQLite keeps whatever type name you declare, like datetime(6) or json, but only uses it to pick an affinity. Schemity had written those…
Show thread
I ran Bitwarden's database back through Schemity, and SQL Server stopped the script at line 983: "Constraint name '#Cols_pkey' not permitted." There is no table called #Cols. One of Bitwarden's 574 stored procedures creates it as a temporary table. Our import split the procedure…
Show thread

Fri, Oct 23

I rebuilt Invoice Ninja's database from the SQL Schemity wrote, and the copy accepted a company key "probe-key " right next to an existing "probe-key". The original refuses that. Its text columns use utf8mb4_unicode_ci, which ignores trailing spaces, so the two keys are…

Thu, Oct 22